Skip to content

Commit

Permalink
Better documentation for ERESTARTSYS
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Satoru Takeuchi authored and Linus Torvalds committed Jun 1, 2007
1 parent d708317 commit 62e5b05
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion include/linux/errno.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.. */
Expand Down

0 comments on commit 62e5b05

Please sign in to comment.