lkml.org 
[lkml]   [2009]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RESEND][RFC PATCH v2] waitfd
Scott James Remnant wrote:
> On Thu, 2009-01-08 at 15:36 -0500, Casey Dahlin wrote:
>
>
>> Roland McGrath wrote:
>>
>>>>> Since waitfd shouldn't consume the child termination notification
>>>>> waitfd should be more widely usable than the wait*() interfaces.
>>>>>
>>> waitid can be used that way with WNOWAIT.
>>>
>> Yes, but waitfd does not have this flag. The reason being waitfd just
>> calls waitid internally, and there is no guarantee (afaik) that
>> calling waitid with WNOWAIT multiple times in succession will yield
>> different results each time. This breaks the streaming behavior of the
>> descriptor.
>>
>>
> This would definitely be a Nice To Have though!
>
> Being able to use waitid() on another process of the same uid, with
> WNOHANG, in a streaming fashion would be a *very* cool thing.
>
> Scott
>
That could be done in a separate patch for waitid itself, and its a
simple change to propagate it through waitfd (just one less EINVAL
case). In terms of waitfd we'd be supersetting the interface, so its no
big deal to add. In terms of waitid I'd have to check and make sure that
we wouldn't be breaking compliance by allowing it to return something
different on every call (this would likely affect cases where
waitid(WNOWAIT) was used even in a normal fashion as well).

--CJD


\
 
 \ /
  Last update: 2009-01-10 22:23    [W:0.410 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site