From: Satoru Takeuchi Date: Fri, 1 Jun 2007 07:47:06 +0000 (-0700) Subject: Better documentation for ERESTARTSYS X-Git-Tag: v2.6.22-rc4~27 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=62e5b05db6cd5dd9cf9614cc5d2d0702c1e339bb;p=linux-2.6 Better documentation for ERESTARTSYS Add comment for errnos related to restart syscall to avoid the leakage of them to user programs. Signed-off-by: Satoru Takeuchi Cc: Oleg Nesterov Acked-by: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/linux/errno.h b/include/linux/errno.h index d90b80f9b2..46685832ed 100644 --- a/include/linux/errno.h +++ b/include/linux/errno.h @@ -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.. */