Re: Bug#445576: ITP: detach -- command to detach a process
Kevin == Kevin Mark [EMAIL PROTECTED] writes: Kevin How is this different from 'nohup' or screen? Answer is on the website, quoted: === cut === When Slashdot found out about detach, ScriptedReplay asked why one would use detach, instead of nohup, which comes with the system. The truth is that I didn't find nohup when searching for a command that would run another command detached from the terminal. The reason is that nohup doesn't really do that: nohup, as the name implies, makes your command ignore SIGHUP. That is, unless you set a handler for it yourself, in which case you will still receive the signal when the terminal exits. You can use normal shell redirection and backgrounding on your process (although nohup will automatically redirect standard output to nohup.out if you don't redirect it). detach uses the setsid system call to detach the command from the terminal. This means your process simply won't get a SIGHUP when the terminal exits, so you are free to use SIGHUP for things like reloading configuration files (like many daemons do). The disadvantage is that the standard file descriptors must be closed before calling setsid. For this reason, normal redirection doesn't work with detach, so explicit support for redirection has been added. detach also contains an option for writing the pid of the detached process to a file. === cut === -- Brian May [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: Bug#445576: ITP: detach -- command to detach a process
Kevin Mark [EMAIL PROTECTED] writes: On Sun, Oct 07, 2007 at 11:38:12AM +1000, Aníbal Monsalve Salazar wrote: Package: wnpp Severity: wishlist Owner: Anibal Monsalve Salazar [EMAIL PROTECTED] Package name: detach Version: 0.2.3-1 Upstream Author: Robbert Haarman [EMAIL PROTECTED] URL: http://inglorion.net/software/detach/ Description: This command forks a new process, detaches it from the terminal, and executes a given command in it. This can be used for starting processes that don't terminate when the controlling terminal does. How is this different from 'nohup' or screen? I would add: How is this different from 'detachtty'? which IMHO does exactly the same thing... -- S. Y. A(R). A.
Re: Bug#445576: ITP: detach -- command to detach a process
On Sun, Oct 07, 2007 at 04:38:59PM +1000, Brian May wrote: Kevin == Kevin Mark [EMAIL PROTECTED] writes: Kevin How is this different from 'nohup' or screen? Answer is on the website, quoted: === cut === When Slashdot found out about detach, ScriptedReplay asked why one would use detach, instead of nohup, which comes with the system. The truth is that I didn't find nohup when searching for a command that would run another command detached from the terminal. The reason is that nohup doesn't really do that: nohup, as the name implies, makes your command ignore SIGHUP. That is, unless you set a handler for it yourself, in which case you will still receive the signal when the terminal exits. You can use normal shell redirection and backgrounding on your process (although nohup will automatically redirect standard output to nohup.out if you don't redirect it). detach uses the setsid system call to detach the command from the terminal. $ apropos -s 1 setsid setsid (1) - run a program in a new session $ dpkg -S bin/setsid util-linux: /usr/bin/setsid If that's inadequate, let's enhance it instead of adding yet another program. -- Colin Watson [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: Bug#445576: ITP: detach -- command to detach a process
Colin == Colin Watson [EMAIL PROTECTED] writes: Colin $ apropos -s 1 setsid setsid (1) - run a program in a new Colin session $ dpkg -S bin/setsid util-linux: /usr/bin/setsid Colin If that's inadequate, let's enhance it instead of adding Colin yet another program. The website gave me the impression both programs are the same, except for the name. -- Brian May [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: Bug#445576: ITP: detach -- command to detach a process
Artem == Artem V Andreev [EMAIL PROTECTED] writes: Artem I would add: How is this different from 'detachtty'? Artem which IMHO does exactly the same thing... From the package description: Description: Attach/detach from interactive processes across the network detachtty lets you run interactive programs non-interactively, and connect to them over the network when you do need to interact with them. It's designed for long-running Lisp processes. Unlike screen, it works in emacs comint modes, and unlike qcmu, it deals correctly with passing on a SIGINT sent to it. Needs ssh for operation over the net. detachtty looks closer to screen then detach/nohup/setsid. -- Brian May [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#445576: ITP: detach -- command to detach a process
Package: wnpp Severity: wishlist Owner: Anibal Monsalve Salazar [EMAIL PROTECTED] Package name: detach Version: 0.2.3-1 Upstream Author: Robbert Haarman [EMAIL PROTECTED] URL: http://inglorion.net/software/detach/ Description: This command forks a new process, detaches it from the terminal, and executes a given command in it. This can be used for starting processes that don't terminate when the controlling terminal does. License: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the Software), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Aníbal Monsalve Salazar -- http://v7w.com/anibal signature.asc Description: Digital signature
Re: Bug#445576: ITP: detach -- command to detach a process
On Sun, Oct 07, 2007 at 11:38:12AM +1000, Aníbal Monsalve Salazar wrote: Package: wnpp Severity: wishlist Owner: Anibal Monsalve Salazar [EMAIL PROTECTED] Package name: detach Version: 0.2.3-1 Upstream Author: Robbert Haarman [EMAIL PROTECTED] URL: http://inglorion.net/software/detach/ Description: This command forks a new process, detaches it from the terminal, and executes a given command in it. This can be used for starting processes that don't terminate when the controlling terminal does. How is this different from 'nohup' or screen? -- | .''`. == Debian GNU/Linux == | my web site: | | : :' : The Universal |mysite.verizon.net/kevin.mark/| | `. `' Operating System| go to counter.li.org and | | `-http://www.debian.org/ |be counted! #238656 | | my keyserver: subkeys.pgp.net | my NPO: cfsg.org | |join the new debian-community.org to help Debian! | |___ Unless I ask to be CCd, assume I am subscribed ___|