lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 14 Jul 2007 11:53:35 -0700 (PDT)
From:	Davide Libenzi <davidel@...ilserver.org>
To:	Michael Kerrisk <mtk-manpages@....net>
cc:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: signalfd() semantics after execve()

On Sat, 14 Jul 2007, Michael Kerrisk wrote:

> Davide, 
> 
> I'm working on the signalfd(2) man page, and I've come
> acorss some puzzling behaviour...  
> 
> What are the intended semantics of a signalfd file descriptor
> after an execve()?
> 
> As far as I can work out, after an execve() the file descriptor
> is still available, but reads from it always return 0, even if:
> 
> a) there were signals pending before the execve().
>    However, sigpending() shows the signal as pending,
>    and the signal can be accepted using sigwaitinfo().
> 
> b) we generate a signal after the execve().
>  
> Is this intended behavior (the "orphaned sighand" condition
> mentioned in the draft man page you sent me?)?  Is it a bug?

It is the intended behaviour. Just like reading from a socket where the 
remote peer disconnected. A return 0 from a read from a signalfd should be 
interpreted as the "virtual connection" with the signal source has been 
dropped.



- Davide


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ