Hello Luis, On Sun, May 8, 2011 at 10:10 PM, Luis Javier Merino <ninjalj@xxxxxxxxx> wrote: > Hi, > > I'm not sure on the meaning of the following excerpt from > siginterrupt(3), in particular the last sentence: > > "If the flag argument is false (0), then system > calls will be restarted if interrupted by the specified signal sig. This is > the default behavior in Linux. However, when a new signal handler is > specified with the signal(2) function, the system call is interrupted by > default." > > I interpret the second sentence ("This is the default behavior in > Linux") as meaning that signal(2) by default is equivalent to > sigaction(2) with SA_RESTART set. The last sentence seems to mean the > opposite, which is untrue in the default case. So, what was the intent > of that sentence? > > I came across this on a question at StackOverflow: > http://stackoverflow.com/questions/5929309/recvfrom-timeout-with-alarm/5929386#5929386 > the "wrongness" of the manpage was first noticed by Zachary Weinberg. I would guess that the sentence cam about because of someone's confusion with the signal(2) system call versus the glibc wrapper (or the siginterrupt(3) page was written long ago in libc[45] days; see the signal(2) man page). The simple solution is to remove the last sentence for man-pages-3.33, and that's what I have done for man-pages-3.33. Cheers, Michael -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Author of "The Linux Programming Interface"; http://man7.org/tlpi/ -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html