[issue895] pselect(2) implementation

Nicolas Thery nthery at gmail.com
Sat Dec 29 01:32:10 PST 2007


2007/12/27, Jeffrey Hsu <hsu at dragonflybsd.org>:
> Don't forget to add the hook to the Linux emulation layer for this system call.

Thanks for the remark.  I completely forgot linux emulation.  The
pselect syscall was introduced in linux 2 years ago:

http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.23.y.git;a=commit;h=9f72949f679df06021c9e43886c9191494fdb007

pselect() is still implemented by a wrapper in glibc though, at least
for debian 4.0.  I'll try to implement the hook anyway.

Additionally, reading  the linux pselect commit log revealed what
looks like a bug in my patch: if pselect() is interrupted by a signal
that was blocked prior to the call and unblocked by pselect(), the
syscall is interrupted but the  signal handler is not called because
the patch restores the original mask before userret() is called.
pselect() should probably be implemented like sigsuspend() instead.





More information about the Bugs mailing list