lkml.org 
[lkml]   [2001]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH][RFC] Pollable /proc/<pid>/ - avoid SIGCHLD/poll() races
Paul Menage <pmenage@ensim.com> wrote:
>Except that this enhancement is not completely safe, as if you get more
>than 1024 children reaped (assuming you send two bytes of pid and two
>bytes of status) between checks of the pipe, you'll lose notifications.

Obviously, but the cases where the number of children is bounded below
1024 are rather frequent

>At least if you're only using the pipe to stop select() from blocking,
>you don't care about overflowing the pipe as there's no important
>information in there anyway.

sure, but then you have to put the pid/exit status somewhere else and
do some signal blocking/unblocking. In either case, it's portable,
which polling on /proc/pid isn't

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

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