[lkml]   [2001]   [Oct]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH][RFC] Pollable /proc/<pid>/ - avoid SIGCHLD/poll() races
Hi Paul,

On Thu, 04 Oct 2001, Paul Menage wrote:
> I've recently run across a problem where a server (in this case,
> sshd) can deadlock itself if a SIGCHLD arrives just before it calls
> select(), but after it has checked whether its child_terminated. So
> when the select() is called, the SIGCHLD signal handler has already
> run and set the child_terminated flag, and there's nothing to wake
> the select().
> The only real user-space solution to this is to have the SIGCHLD
> handler somehow cause the select() to return immediately

... or implement pselect:

or use sigsetjmp/siglongjmp

Both would be portable and not special to child handling.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:04    [W:0.091 / U:11.580 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site