MaD dUCK on Thu, 4 Jan 2001 17:07:34 -0500 |
another question to the list(s), just because you guys provide answers fast and i am learning... - when i start xterm& from another xterm window, the new xterm window survives when the parent xterm window is closed. - when i start something like xscreensaver& from .xsession (or ssh-agent), it does not terminate when .xsession terminates. from all this i am led to believe that spawning a process with the & operator (?) detaches it from the parent process, so that killing the parent does not affect the spawned child. however, then i do this from an xterm: madduck@fishbowl ~> ps PID TTY TIME CMD 523 pts/16 00:00:00 bash2 2484 pts/16 00:00:00 ps madduck@fishbowl ~> xterm& [1] 2503 madduck@fishbowl ~> ps PID TTY TIME CMD 523 pts/16 00:00:00 bash2 2503 pts/16 00:00:00 xterm 2559 pts/16 00:00:00 ps madduck@fishbowl ~> ps -fC xterm UID PID PPID C STIME TTY TIME CMD madduck 2503 523 0 22:50 pts/16 00:00:00 xterm and find that xterm is still parented by the bash shell that spawns it. when i close that bash shell, the parent id becomes 1. i look further at windowmaker: - when i start xterm& from windowmaker and close windowmaker (which is at the end of .xsession), techically, windowmaker should terminate along with its children, but leave the x server open with the xterm. but it doesn't... closing windowmaker terminates the xterm& window as well. and mutt/urlview/netscape: - when i have mutt spawn netscape to display a url via urlview (default config) and then close mutt, netscape is killed. and i am left a little clueless. just how does spawning and process parenting work then? the reason i am asking is because everytime i log out of my x server, my ssh-agent session continues to live, so after a couple of days i have some 15 ssh-agents running, and that's annoying... up to know i was expecting them to die when .xsession dies as a result of wmaker (it's last line) exiting... can this be enabled? how would one go about making sure that ssh-agent does not survive after it is not used anymore? a 'kill' after wmaker? thanks, martin [greetings from the heart of the sun]# echo madduck@!#:1:s@\@@@.net -- you work very hard. don't try to think as well. ______________________________________________________________________ Philadelphia Linux Users Group - http://www.phillylinux.org Announcements-http://lists.phillylinux.org/mail/listinfo/plug-announce General Discussion - http://lists.phillylinux.org/mail/listinfo/plug
|
|