Re: [patch 1/4] signalfd v1 - signalfd core ...

2007-03-15 Thread Davide Libenzi
On Thu, 15 Mar 2007, Ulrich Drepper wrote: > On 3/7/07, Davide Libenzi wrote: > > Let's do this. How about you throw this way one of the case that would > > possibly break, and I test it? > > Since you make such claims I assume your signalfd() implementation > considers a signal delivered once

Re: [patch 1/4] signalfd v1 - signalfd core ...

2007-03-15 Thread Ulrich Drepper
On 3/7/07, Davide Libenzi wrote: Let's do this. How about you throw this way one of the case that would possibly break, and I test it? Since you make such claims I assume your signalfd() implementation considers a signal delivered once it is reported to an epoll() caller. Right? This is not

Re: [patch 1/4] signalfd v1 - signalfd core ...

2007-03-15 Thread Ulrich Drepper
On 3/7/07, Davide Libenzi davidel@xmailserver.org wrote: Let's do this. How about you throw this way one of the case that would possibly break, and I test it? Since you make such claims I assume your signalfd() implementation considers a signal delivered once it is reported to an epoll()

Re: [patch 1/4] signalfd v1 - signalfd core ...

2007-03-15 Thread Davide Libenzi
On Thu, 15 Mar 2007, Ulrich Drepper wrote: On 3/7/07, Davide Libenzi davidel@xmailserver.org wrote: Let's do this. How about you throw this way one of the case that would possibly break, and I test it? Since you make such claims I assume your signalfd() implementation considers a signal

Re: [patch 1/4] signalfd v1 - signalfd core ...

2007-03-07 Thread Davide Libenzi
On Wed, 7 Mar 2007, Jeremy Fitzhardinge wrote: > Davide Libenzi wrote: > > You have the *choice* to do that: > > > > 1) You want standard delivery only: > > > >- Just dont use signalfd > > > > 2) you want signalfd only: > > > >- Do a sigprocmask(SIG_BLOCK) of the same mask you pass to

Re: [patch 1/4] signalfd v1 - signalfd core ...

2007-03-07 Thread Jeremy Fitzhardinge
Davide Libenzi wrote: > You have the *choice* to do that: > > 1) You want standard delivery only: > >- Just dont use signalfd > > 2) you want signalfd only: > >- Do a sigprocmask(SIG_BLOCK) of the same mask you pass to signalfd > > If you want both, you can have it. Race free. > It's

Re: [patch 1/4] signalfd v1 - signalfd core ...

2007-03-07 Thread Davide Libenzi
On Wed, 7 Mar 2007, Ulrich Drepper wrote: > On 3/7/07, Linus Torvalds <[EMAIL PROTECTED]> wrote: > > > 1) You want standard delivery only: > > > > > >- Just dont use signalfd > > > > > > 2) you want signalfd only: > > > > > >- Do a sigprocmask(SIG_BLOCK) of the same mask you pass to

Re: [patch 1/4] signalfd v1 - signalfd core ...

2007-03-07 Thread Davide Libenzi
On Wed, 7 Mar 2007, Linus Torvalds wrote: > > > On Wed, 7 Mar 2007, Davide Libenzi wrote: > > > > You have the *choice* to do that: > > > > 1) You want standard delivery only: > > > >- Just dont use signalfd > > > > 2) you want signalfd only: > > > >- Do a sigprocmask(SIG_BLOCK) of

Re: [patch 1/4] signalfd v1 - signalfd core ...

2007-03-07 Thread Ulrich Drepper
On 3/7/07, Linus Torvalds <[EMAIL PROTECTED]> wrote: > 1) You want standard delivery only: > >- Just dont use signalfd > > 2) you want signalfd only: > >- Do a sigprocmask(SIG_BLOCK) of the same mask you pass to signalfd > > If you want both, you can have it. Race free. .. but maybe

Re: [patch 1/4] signalfd v1 - signalfd core ...

2007-03-07 Thread Linus Torvalds
On Wed, 7 Mar 2007, Davide Libenzi wrote: > > You have the *choice* to do that: > > 1) You want standard delivery only: > >- Just dont use signalfd > > 2) you want signalfd only: > >- Do a sigprocmask(SIG_BLOCK) of the same mask you pass to signalfd > > If you want both, you can

Re: [patch 1/4] signalfd v1 - signalfd core ...

2007-03-07 Thread Davide Libenzi
On Wed, 7 Mar 2007, Jeremy Fitzhardinge wrote: > Davide Libenzi wrote: > > If you think a signal as a generic event source, than you see how more > > instances can attach to it and receive them. > > You can have multiple signalfd with whatever sigmasks, even intersecting. > > You can pass the

Re: [patch 1/4] signalfd v1 - signalfd core ...

2007-03-07 Thread Jeremy Fitzhardinge
Davide Libenzi wrote: > If you think a signal as a generic event source, than you see how more > instances can attach to it and receive them. > You can have multiple signalfd with whatever sigmasks, even intersecting. > You can pass the fd around, w/out the fear that a standard signal delivery

Re: [patch 1/4] signalfd v1 - signalfd core ...

2007-03-07 Thread Davide Libenzi
On Wed, 7 Mar 2007, Jeremy Fitzhardinge wrote: > Davide Libenzi wrote: > > On Wed, 7 Mar 2007, Linus Torvalds wrote: > > > > > >> On Wed, 7 Mar 2007, Stephen Rothwell wrote: > >> > >>> You probably need the queue anyway because the real time signals are > >>> supposed to queue. > >>>

Re: [patch 1/4] signalfd v1 - signalfd core ...

2007-03-07 Thread Jeremy Fitzhardinge
Davide Libenzi wrote: > On Wed, 7 Mar 2007, Linus Torvalds wrote: > > >> On Wed, 7 Mar 2007, Stephen Rothwell wrote: >> >>> You probably need the queue anyway because the real time signals are >>> supposed to queue. >>> >> Davide - the *real* problem is (I think) that you try to

Re: [patch 1/4] signalfd v1 - signalfd core ...

2007-03-07 Thread Davide Libenzi
On Wed, 7 Mar 2007, Linus Torvalds wrote: > On Wed, 7 Mar 2007, Stephen Rothwell wrote: > > > > You probably need the queue anyway because the real time signals are > > supposed to queue. > > Davide - the *real* problem is (I think) that you try to allow signals to > be returned *both* by

Re: [patch 1/4] signalfd v1 - signalfd core ...

2007-03-07 Thread Davide Libenzi
On Wed, 7 Mar 2007, Stephen Rothwell wrote: > Then, of course, you have to think about how to get the siginfo_t out to > the user process. Do you just return it from the read after the read > that returns the signal number? If so, you need to know if the process > did a compat read syscall read

Re: [patch 1/4] signalfd v1 - signalfd core ...

2007-03-07 Thread Linus Torvalds
On Wed, 7 Mar 2007, Stephen Rothwell wrote: > > You probably need the queue anyway because the real time signals are > supposed to queue. Davide - the *real* problem is (I think) that you try to allow signals to be returned *both* by signalfd() and as a real signal. That's wrong, wrong,

Re: [patch 1/4] signalfd v1 - signalfd core ...

2007-03-07 Thread Stephen Rothwell
On Tue, 6 Mar 2007 23:11:49 -0800 (PST) Davide Libenzi wrote: > > On Wed, 7 Mar 2007, Stephen Rothwell wrote: > > > On Tue, 6 Mar 2007 17:36:56 -0800 (PST) Davide Libenzi > > wrote: > > > > > > The read(2) call will read u32 signal numbers that landed over the > > > signalfd. It returns the

Re: [patch 1/4] signalfd v1 - signalfd core ...

2007-03-07 Thread Stephen Rothwell
On Tue, 6 Mar 2007 23:11:49 -0800 (PST) Davide Libenzi davidel@xmailserver.org wrote: On Wed, 7 Mar 2007, Stephen Rothwell wrote: On Tue, 6 Mar 2007 17:36:56 -0800 (PST) Davide Libenzi davidel@xmailserver.org wrote: The read(2) call will read u32 signal numbers that landed over the

Re: [patch 1/4] signalfd v1 - signalfd core ...

2007-03-07 Thread Linus Torvalds
On Wed, 7 Mar 2007, Stephen Rothwell wrote: You probably need the queue anyway because the real time signals are supposed to queue. Davide - the *real* problem is (I think) that you try to allow signals to be returned *both* by signalfd() and as a real signal. That's wrong, wrong, wrong.

Re: [patch 1/4] signalfd v1 - signalfd core ...

2007-03-07 Thread Davide Libenzi
On Wed, 7 Mar 2007, Stephen Rothwell wrote: Then, of course, you have to think about how to get the siginfo_t out to the user process. Do you just return it from the read after the read that returns the signal number? If so, you need to know if the process did a compat read syscall read or

Re: [patch 1/4] signalfd v1 - signalfd core ...

2007-03-07 Thread Davide Libenzi
On Wed, 7 Mar 2007, Linus Torvalds wrote: On Wed, 7 Mar 2007, Stephen Rothwell wrote: You probably need the queue anyway because the real time signals are supposed to queue. Davide - the *real* problem is (I think) that you try to allow signals to be returned *both* by signalfd() and

Re: [patch 1/4] signalfd v1 - signalfd core ...

2007-03-07 Thread Jeremy Fitzhardinge
Davide Libenzi wrote: On Wed, 7 Mar 2007, Linus Torvalds wrote: On Wed, 7 Mar 2007, Stephen Rothwell wrote: You probably need the queue anyway because the real time signals are supposed to queue. Davide - the *real* problem is (I think) that you try to allow signals to be

Re: [patch 1/4] signalfd v1 - signalfd core ...

2007-03-07 Thread Davide Libenzi
On Wed, 7 Mar 2007, Jeremy Fitzhardinge wrote: Davide Libenzi wrote: On Wed, 7 Mar 2007, Linus Torvalds wrote: On Wed, 7 Mar 2007, Stephen Rothwell wrote: You probably need the queue anyway because the real time signals are supposed to queue. Davide - the *real*

Re: [patch 1/4] signalfd v1 - signalfd core ...

2007-03-07 Thread Jeremy Fitzhardinge
Davide Libenzi wrote: If you think a signal as a generic event source, than you see how more instances can attach to it and receive them. You can have multiple signalfd with whatever sigmasks, even intersecting. You can pass the fd around, w/out the fear that a standard signal delivery

Re: [patch 1/4] signalfd v1 - signalfd core ...

2007-03-07 Thread Davide Libenzi
On Wed, 7 Mar 2007, Jeremy Fitzhardinge wrote: Davide Libenzi wrote: If you think a signal as a generic event source, than you see how more instances can attach to it and receive them. You can have multiple signalfd with whatever sigmasks, even intersecting. You can pass the fd around,

Re: [patch 1/4] signalfd v1 - signalfd core ...

2007-03-07 Thread Linus Torvalds
On Wed, 7 Mar 2007, Davide Libenzi wrote: You have the *choice* to do that: 1) You want standard delivery only: - Just dont use signalfd 2) you want signalfd only: - Do a sigprocmask(SIG_BLOCK) of the same mask you pass to signalfd If you want both, you can have it. Race

Re: [patch 1/4] signalfd v1 - signalfd core ...

2007-03-07 Thread Ulrich Drepper
On 3/7/07, Linus Torvalds [EMAIL PROTECTED] wrote: 1) You want standard delivery only: - Just dont use signalfd 2) you want signalfd only: - Do a sigprocmask(SIG_BLOCK) of the same mask you pass to signalfd If you want both, you can have it. Race free. .. but maybe with more code

Re: [patch 1/4] signalfd v1 - signalfd core ...

2007-03-07 Thread Davide Libenzi
On Wed, 7 Mar 2007, Linus Torvalds wrote: On Wed, 7 Mar 2007, Davide Libenzi wrote: You have the *choice* to do that: 1) You want standard delivery only: - Just dont use signalfd 2) you want signalfd only: - Do a sigprocmask(SIG_BLOCK) of the same mask you pass

Re: [patch 1/4] signalfd v1 - signalfd core ...

2007-03-07 Thread Davide Libenzi
On Wed, 7 Mar 2007, Ulrich Drepper wrote: On 3/7/07, Linus Torvalds [EMAIL PROTECTED] wrote: 1) You want standard delivery only: - Just dont use signalfd 2) you want signalfd only: - Do a sigprocmask(SIG_BLOCK) of the same mask you pass to signalfd If you want

Re: [patch 1/4] signalfd v1 - signalfd core ...

2007-03-07 Thread Jeremy Fitzhardinge
Davide Libenzi wrote: You have the *choice* to do that: 1) You want standard delivery only: - Just dont use signalfd 2) you want signalfd only: - Do a sigprocmask(SIG_BLOCK) of the same mask you pass to signalfd If you want both, you can have it. Race free. It's only usefully

Re: [patch 1/4] signalfd v1 - signalfd core ...

2007-03-07 Thread Davide Libenzi
On Wed, 7 Mar 2007, Jeremy Fitzhardinge wrote: Davide Libenzi wrote: You have the *choice* to do that: 1) You want standard delivery only: - Just dont use signalfd 2) you want signalfd only: - Do a sigprocmask(SIG_BLOCK) of the same mask you pass to signalfd If you

Re: [patch 1/4] signalfd v1 - signalfd core ...

2007-03-06 Thread Davide Libenzi
On Wed, 7 Mar 2007, Stephen Rothwell wrote: > On Tue, 6 Mar 2007 17:36:56 -0800 (PST) Davide Libenzi > wrote: > > > > The read(2) call will read u32 signal numbers that landed over the > > signalfd. It returns the size of the data copied, or zero if the sighand > > we are attached to, has been

Re: [patch 1/4] signalfd v1 - signalfd core ...

2007-03-06 Thread Stephen Rothwell
On Tue, 6 Mar 2007 17:36:56 -0800 (PST) Davide Libenzi wrote: > > The read(2) call will read u32 signal numbers that landed over the > signalfd. It returns the size of the data copied, or zero if the sighand > we are attached to, has been detached. So what about signals that the user asked for

Re: [patch 1/4] signalfd v1 - signalfd core ...

2007-03-06 Thread Davide Libenzi
On Tue, 6 Mar 2007, Davide Libenzi wrote: > This patch series implements a new signalfd() system call. I took part of > the original Linus code (and you know how badly it can be broken :), and I > added even more breakage ;) I forgot to add that this requires the anonymous inode source

[patch 1/4] signalfd v1 - signalfd core ...

2007-03-06 Thread Davide Libenzi
This patch series implements a new signalfd() system call. I took part of the original Linus code (and you know how badly it can be broken :), and I added even more breakage ;) The patch had to be almost completely changed. This patch allows multiple signalfd to listen for signals on the same

[patch 1/4] signalfd v1 - signalfd core ...

2007-03-06 Thread Davide Libenzi
This patch series implements a new signalfd() system call. I took part of the original Linus code (and you know how badly it can be broken :), and I added even more breakage ;) The patch had to be almost completely changed. This patch allows multiple signalfd to listen for signals on the same

Re: [patch 1/4] signalfd v1 - signalfd core ...

2007-03-06 Thread Davide Libenzi
On Tue, 6 Mar 2007, Davide Libenzi wrote: This patch series implements a new signalfd() system call. I took part of the original Linus code (and you know how badly it can be broken :), and I added even more breakage ;) I forgot to add that this requires the anonymous inode source contained

Re: [patch 1/4] signalfd v1 - signalfd core ...

2007-03-06 Thread Stephen Rothwell
On Tue, 6 Mar 2007 17:36:56 -0800 (PST) Davide Libenzi davidel@xmailserver.org wrote: The read(2) call will read u32 signal numbers that landed over the signalfd. It returns the size of the data copied, or zero if the sighand we are attached to, has been detached. So what about signals that

Re: [patch 1/4] signalfd v1 - signalfd core ...

2007-03-06 Thread Davide Libenzi
On Wed, 7 Mar 2007, Stephen Rothwell wrote: On Tue, 6 Mar 2007 17:36:56 -0800 (PST) Davide Libenzi davidel@xmailserver.org wrote: The read(2) call will read u32 signal numbers that landed over the signalfd. It returns the size of the data copied, or zero if the sighand we are attached