Editing 1888: Still in Use

Jump to: navigation, search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 8: Line 8:
  
 
==Explanation==
 
==Explanation==
[[Cueball]] is trying to remove the trash bag from his garbage can. However, the can refuses to let him do so, citing that a paper towel in the trash is being used by some object in his home.
+
{{incomplete|Rough draft, can still use elaboration. Seems like there are two paragraphs more or less stating the same...? Do NOT delete this tag too soon.}}
  
This comic draws parallels between the act of emptying a physical rubbish bin and emptying the {{w|Trash (computing)|recycle bin}} integrated into a desktop computing environment like Windows, macOS, most Linux derivatives, and others. It originated with the {{w|Xerox Alto}}, but was first commercially introduced on {{w|Apple Lisa}} in 1982 called ''Wastebasket'' and, while it was adopted by most other desktop environment operating system, using slightly different names, the main purpose still remains: A user can restore a file after they have deleted it -- hence the most common name ''recycle bin'', you still can get your ''paper towel'' and use it again. In many (earlier) command line based systems like DOS or UNIX/Linux (besides the desktop interfaces) a removed file was gone. Some ''undelete'' commands exist, but there are hard restrictions because the then free space on the hard drive must not have been used again and often file names aren't fully recoverable.
+
Cueball is trying to remove the trash bag from his garbage can. However, the trash refuses to let him do so, citing that a paper towel in the trash is being used by some object in his home.
  
But sometimes when attempting to delete files, a running program may still have the file marked as in use. The operating system will therefore prevent the file's deletion, but some do not tell the user which program is using the file.
+
By itself, the comic is patently ridiculous; it is meant as a reflection of a common problem in computer use, specifically that of removing storage devices. If a file currently stored on a storage device is still open, the operating system will normally refuse to perform the "safely remove" function on that device. However, the operating system gives no indication of which application(s) have open file(s), and in addition, occasionally the system will falsely flag a file as still being active; this frequently happens if the user closes a file after triggering the "safely remove" function but before the alert comes up. This is frustrating for users, as they have little indication of the next step in removing the device. (Newer versions of Windows alleviate this problem somewhat for flash drives by adding a "Continue" button to the still-in-use dialog box; pressing "Continue" forces Windows to perform the "safely remove" function and unmount the drive even if one or more files on it are still in use.)
  
Preventing the file from being deleted from the file system in this case may be a correct behavior, because the document is still being worked on. But sometimes it may happen erroneously, perhaps because of a program not closing the file properly, a glitch in the operating system, or user error. The user then is required to find the cause of the problem and rectify it before the file can be deleted. This may be difficult because error messages may not reveal the affected file or the program blocking its removal. Similar problems may occur when unmounting (or "safely removing") a removable storage device.
+
This comic may actually be a reference to the fact that one cannot delete a file in Windows while it's being used by a program, and Windows will also not tell the user which program it is, rather than the above explanation.
  
The title text may refer to a simple solution to these sorts of problems: Wait a while, perhaps overnight, and see if the (unknown) application(s) have closed the open file(s). Alternatively, the user can shut down the system to make absolutely sure that nothing is using anything. This is usually effective and harmless -- programs that ''falsely'' flagged something in the recycle bin as "in use" usually won't recreate the problem when the computer finishes booting up -- but this is really not a convenient solution for the user because all applications are closed.
+
The title text may be a reference to a simple solution to these sorts of problems: Wait a while, perhaps overnight, and see if the (unknown) application(s) close the open file(s). Alternatively, the user can shut down the system to make absolutely sure that nothing is using anything, and then remove the storage device. In some situations, this is the ''only'' way (at least in Windows) to safely remove an external hard drive from a computer.
  
== Solutions ==
+
This comic draws parallels between the act of emptying a physical rubbish bin and performing garbage collection on a filesystem, iconically represented by Microsoft as the emptying of a virtual wastebin on the desktop. It also may refer the growing trend of Internet of things, which is a concept that enables everyday objects to collect and exchange data. Sometimes when attempting to delete files the software may still have the file marked as in use, because the file is still marked as open by at least one process. The software will therefore prevent its deletion. This may be correct behaviour, as in when a document is still being worked on in a program, or it may happen erroneously, perhaps because the program has not closed the file properly, maybe because of incorrect behaviour. The user is then required to find the cause of the problem and rectify it before the file can be deleted. This may be difficult if the user is not familiar with the file in question, or the program that would have used it.
Advanced users may be inconvenienced by unhelpful error messages but at least are likely to know the tools available to solve the problem. However, a less experienced user just trying to free some space is not only annoyed, their only solution is to reboot or shut down the computer.
 
  
Some tools:
+
In the case of the physical bin, the absurdity of this is highlighted by imagining that a paper towel is still locked as "in use" and that the rubbish bin won't allow it to be taken out for final disposal until the household object that was "using" the towel has been identified.
* On Windows, the [https://docs.microsoft.com/en-us/sysinternals/downloads/handle "handle"] command line tool allows listing, searching, and closing file handles, showing the associated process.
 
* On Linux and OS X there is a command line tool {{w|lsof}} (list open files) which also lists open sockets and more. If the filename or program name is known, the usefulness of this tool is vastly enhanced by combining it with {{w|grep}}.
 
* Unix systems derived from SVR4 have the {{w|fuser (Unix)|fuser(1)}} command (fstat(1) on BSD) that lists and optionally kills the process keeping a file open. It's useful on shutdowns because open files can prevent unmounting filesystems, potentially leaving them a mess.
 
  
 
==Transcript==
 
==Transcript==
:[Cueball is trying to take out a trash bag from his garbage can.]
+
:[Cueball is trying to take out the trash]
 
:Trash: Sorry, you can't empty the garbage yet. A paper towel in here is currently in use by some object in your house.
 
:Trash: Sorry, you can't empty the garbage yet. A paper towel in here is currently in use by some object in your house.
  
Line 33: Line 29:
 
[[Category:Comics featuring Cueball]]
 
[[Category:Comics featuring Cueball]]
 
[[Category:Computers]]
 
[[Category:Computers]]
 +
[[Category:Programming]]

Please note that all contributions to explain xkcd may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see explain xkcd:Copyrights for details). Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel | Editing help (opens in new window)