Re: kill xterm kills app!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jay,

On Wednesday, Apr 28, 2004, at 23:57 US/Eastern, Jay Daniels wrote:

If you start it with the ampersand and later want to close the xterm but
keep the other app (xclock) going, you can use 'disown' to do the same
thing that 'nohup' does when starting it as mentioned in earlier posts.
For example:


$ xclock &
$ disown xclock

Paul


Why does xclock become a child of the xterm process if you use the
ampersand and run it in the background?


xclock actually becomes a child process of the shell (bash, usually). When you start it with nohup, it becomes a child of the init process (usually PID 1) after the 'real' parent (the shell) dies.


I hope the console doesn't work this way.  If you start a server from
the console as root, it doesn't die when you logout does it?

server processes are written in such a way that they automagically attach themselves to the init process as a parent and do not rely on the process that started them. For instance, sendmail doesn't attach itself to the rc script that starts it, otherwise it would die, the moment the script terminates. Also, server processes usually do not need the ambersand, they know how to switch themselves into the background.


Hope that sheds some light on the subject for you.


-- Chris Ruprecht Network Grunt and Bit Pusher extraordinaíre



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux