Date: Thu, 25 Aug 2011 10:00:38 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r225172 - head/lib/libc/sys Message-ID: <201108251000.p7PA0c89097193@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Thu Aug 25 10:00:38 2011 New Revision: 225172 URL: http://svn.freebsd.org/changeset/base/225172 Log: Clarify the behaviour of sigwait() on signal interruption, and note the difference between sigwait() and sigtimedwait()/sigwaitinfo(). Approved by: re (bz) Modified: head/lib/libc/sys/sigwait.2 head/lib/libc/sys/sigwaitinfo.2 Modified: head/lib/libc/sys/sigwait.2 ============================================================================== --- head/lib/libc/sys/sigwait.2 Thu Aug 25 09:38:33 2011 (r225171) +++ head/lib/libc/sys/sigwait.2 Thu Aug 25 10:00:38 2011 (r225172) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 11, 2005 +.Dd August 24, 2011 .Dt SIGWAIT 2 .Os .Sh NAME @@ -82,6 +82,14 @@ selected, it will be the lowest numbered The selection order between realtime and non-realtime signals, or between multiple pending non-realtime signals, is unspecified. +.Sh IMPLEMENTATION NOTES +The +.Fn sigwait +function is implemented as a wrapper around the +.Fn __sys_sigwait +system call, which retries the call on +.Er EINTR +error. .Sh RETURN VALUES If successful, .Fn sigwait Modified: head/lib/libc/sys/sigwaitinfo.2 ============================================================================== --- head/lib/libc/sys/sigwaitinfo.2 Thu Aug 25 09:38:33 2011 (r225171) +++ head/lib/libc/sys/sigwaitinfo.2 Thu Aug 25 10:00:38 2011 (r225172) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 11, 2005 +.Dd August 24, 2011 .Dt SIGTIMEDWAIT 2 .Os .Sh NAME @@ -116,6 +116,16 @@ except that the selected signal number s member, and the cause of the signal shall be stored in the .Va si_code member. +Besides this, the +.Fn sigwaitinfo +and +.Fn sigtimedwait +system calls may return +.Er EINTR +if interrupted by signal, which is not allowed for the +.Fn sigwait +function. +.Pp If any value is queued to the selected signal, the first such queued value is dequeued and, if the info argument is .Pf non- Dv NULL ,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201108251000.p7PA0c89097193>