Better documentation for ERESTARTSYS
authorSatoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Fri, 1 Jun 2007 07:47:06 +0000 (00:47 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Fri, 1 Jun 2007 15:18:29 +0000 (08:18 -0700)
Add comment for errnos related to restart syscall to avoid the leakage of
them to user programs.

Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Acked-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/errno.h

index d90b80f9b28c7c0402b71a8fa19b2cc8d9e5efd8..46685832ed99106bc6e4084f739abadceae0d549 100644 (file)
@@ -5,7 +5,12 @@
 
 #ifdef __KERNEL__
 
-/* Should never be seen by user programs */
+/*
+ * These should never be seen by user programs.  To return one of ERESTART*
+ * codes, signal_pending() MUST be set.  Note that ptrace can observe these
+ * at syscall exit tracing, but they will never be left for the debugged user
+ * process to see.
+ */
 #define ERESTARTSYS    512
 #define ERESTARTNOINTR 513
 #define ERESTARTNOHAND 514     /* restart if no handler.. */