Re: [PATCH] signalfd: retrieve multiple signals with one read() call

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Davide Libenzi
Date: Sunday, May 20, 2007 - 10:05 pm

On Sun, 20 May 2007, Andrew Morton wrote:


I think we can have the check that "if size == 0 return 0". The above 
cited return-0-on-detch would still apply for enough sized buffers. So:

1) size == 0, return 0 (POSIX wants this)

2) size < sizeof(signalfd_siginfo), return EINVAL

3) size >= sizeof(signalfd_siginfo) && DETACH, return 0

The signalfd falls into what POSIX defined as "special file", and can 
return a lower-than-size result.



Because it is a typically used value for still-unused/reserved members? 
Better than random values I think ;)
Members validity is driven by si_code & SI_MASK anyway.


- Davide


-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] signalfd: retrieve multiple signals with one r ..., Davide Libenzi, (Sun May 20, 10:05 pm)