Re: PATCH: Prevent zombie ssh tunnels

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

 



Daniel Veillard wrote:
> On Tue, Sep 11, 2007 at 11:35:46AM +0200, Gerd Hoffmann wrote:
>> Daniel Veillard wrote:
>>>    - the ssh process dies
>>>    - libvirt based application takes some time to notice it
>>>    - the OS span a new process with the same PID after a PID rollabck
>> Can not happen as long as libvirt hasn't asked for the exist status via
>> waitpid() because the pid is still in use by the zombie ssh process.
> 
>   Hum, which is precisely why we need the patch. Still I would feel a bit
> better if we could check that priv->pid is a child of the current process
> something like (getppid(priv->pid) == getpid()) test before any kill would
> do this easilly I think.

Simply keep track which processes you've (successfully) waitpid()'ed
already, then you'll know.

cheers,
  Gerd

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]