[lkml]   [2003]   [May]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: signal queue resource - Posix timers
Ulrich Drepper wrote:
> Hash: SHA1
> > Posix timers are required to fail the
> > timer_create with EAGAIN if "the system lacks sufficient signal queuing
> > resources to honor the request." The current Linux posix-timers
> > implementation doesn't do this.
> That's not really how you can interpret this. At the time timer_create
> is it is not know when the timer expires and whether it's a repeating
> timer. Therefore it is not correct to assume that if timer_create
> succeeds the resources to always deliver the signal are available.

Hi Ulrich,

My intention is to allocate a sigqueue structure in the kernel as part
of the timer_create call. Later on in timer completion, I will use this
preallocated sigqueue entry to queue the siginfo_t for the timer completion.
The Posix timers specification guarantees that there can only be a single
signal pending for a given timer so preallocating one sigqueue structure
for each timer is sufficient.

Perhaps I should have tracked down the appropriate "shall deliver the
signal on timer completion" and quoted it instead. The point is that
the current Linux implementation will fail to deliver the signal at the
whim of other programs which might consume the limited signal queue

I saw your post on the posixtest-discuss which complained about the test suite
trying to force this condition. I agree that this is a bad test. When I preallocate
this resource, I may happily wait for a sigqueue entry to be available
and never return this failure.

Have a look at the Rationale and Notes section B.14.2.2 Create a Per-Process
Timer. It is fairly clear that it expects signal queuing resources to
be allocated at timer_create time and that failing to deliver a completion
signal is never acceptable.

Jim Houston - Concurrent Computer Corp.
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:35    [W:0.063 / U:2.608 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site