Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: recovering zombie process



On 16-01-2007 @ 20:19:08 -0500, Brian K. White wrote:
> 
> 
> They are not zombies, hey are perfectly live running processes.
> I don't know what official term there might be for such processes but I 
> call them headless.
> That is, processes which have become disconnected from their controlling 
> tty and/or their parent process.
> I guess orphan is already the term for when the parent process goes away.
> 
> In this case, it appears the tty has not gone away, merely the parent 
> process.
> what does "ps -ef" show?  or better yet "ps -o tty,pid,ppid,args -C zsh"
> have all the PPID's turned to "1" ?
> 
>

ps -o tty,pid,ppid,args -C zsh  
TT         PID  PPID COMMAND
tty3      5138  5090 -zsh
pts/1     5269  5253 zsh  -----+   
pts/2     5290  5253 zsh       |  those are ruining
pts/3     5314  5253 zsh       |  in screen
pts/0     6032  6031 zsh  -----+
pts/6     6755     1 -zsh
pts/7     7588     1 -zsh
pts/10    1961  1952 -zsh
pts/11    2434     1 -zsh
pts/13    4659  5253 zsh
pts/15    8568  6031 zsh
pts/16   29073     1 -zsh
pts/17   23181     1 -zsh
pts/9    16833 16828 -zsh
pts/8    17134 17126 -zsh
pts/5    17758 16828 -zsh
pts/14   17851 16828 -zsh

> The only ways I know to reconnect to a session are:
> 
> 1) commercial tty multiplexing/cloning software
>    DoubleVision  (tridia.com)
>    Peek (logmon.com)
> 
> 2) freeware tty multiplexing/cloning software
>    ttysnoop
>    screen / mscreen
> 
> In all cases you had to be using the multiplexer before you created the tty 
> so no matter what it's too late for this lot.
> 
> By rights, these processes should have all received a hangup when the 
> parent went away.
> Since they didn't, and if this is going to happen from time to time, then 
> you might want to install autolog or idled
> or other idle process killer which would send a hangup to any processes 
> that appear like these automatically after they've been headless for 
> whatever length of time you configure.
> 
> Perhaps the app that was managing the extra sessions (mrxvt) has a way to 
> reconnect?
> The fact that the tty's didn't change to "?" suggests this.
> 
Some time ago I think I read about that in man mrxvt.
I'll try to find more about that.
Thanks

-- 
~
~
~



Messages sorted by: Reverse Date, Date, Thread, Author