summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-10-30 15:06:20 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2010-10-30 15:06:20 +0200
commit69c3616ade8e268708ef24e5b091f94f2ffe08d4 (patch)
tree7027b0cbd6bca9a2d28cf05987b05eabd07cfd74 /libc
parent18e0f7e66e06b3b128e3d0a8837909f7f474ab69 (diff)
sleep: include Linus' email in the comment
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libc')
-rw-r--r--libc/unistd/sleep.c26
1 files changed, 21 insertions, 5 deletions
diff --git a/libc/unistd/sleep.c b/libc/unistd/sleep.c
index 211c8434e..9db115a29 100644
--- a/libc/unistd/sleep.c
+++ b/libc/unistd/sleep.c
@@ -46,12 +46,28 @@ int main() {
return 0;
}
* Testing on 2.4.20 and on 2.6.35-rc4:
- * With SIG_DFL, nanosleep() is not interrupted by SIGCHLD. Ok.
- * With dummy handler, nanosleep() is interrupted by SIGCHLD. Ok.
- * With SIG_IGN, nanosleep() is NOT interrupted by SIGCHLD.
+ * With SIG_DFL, nanosleep is not interrupted by SIGCHLD. Ok.
+ * With dummy handler, nanosleep is interrupted by SIGCHLD. Ok.
+ * With SIG_IGN, nanosleep is NOT interrupted by SIGCHLD.
* It looks like sleep's workaround for SIG_IGN is no longer needed?
- * The only emails I can find are from 1998 -
- * google for "sleep ignore sigchld".
+ * The only emails I can find are from 1998 (!):
+ * ----------
+ * Subject: Re: sleep ignore sigchld
+ * From: Linus Torvalds <torvalds@transmeta.com>
+ * Date: Mon, 16 Nov 1998 11:02:15 -0800 (PST)
+ *
+ * On Mon, 16 Nov 1998, H. J. Lu wrote:
+ * > That is a kernel bug. SIGCHLD is a special one. Usually it cannot
+ * > be ignored. [snip...]
+ *
+ * No can do.
+ *
+ * "nanosleep()" is implemented in a bad way that makes it impossible to
+ * restart it cleanly. It was done that way because glibc wanted it that way,
+ * not because it's a good idea. [snip...]
+ * ----------
+ * I assume that in the passed twelve+ years, nanosleep got fixed,
+ * but the hack in sleep to work around broken nanosleep was never removed.
*/
# if 0