Re: Unable to reap urb after receiving signal using usbfs.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 12 Feb 2015, Dave Mielke wrote:

> [quoted lines by Alan Stern on 2015/02/12 at 10:10 -0500]
> 
> >Not to me.  The purpose of signalfd is to report pending signals.  
> >Closing or opening a file descriptor shouldn't change the set of 
> >pending signals.
> 
> Once the last signalfd file descriptor for a given signal is closed - in our 
> case, that's only one of them - shouldn't the handling revert to the default 
> for that signal? Isn't it wrong that, when there are no signalfd file 
> descriptors open for a given signal, the signal still seems to stay pending 
> within the signalfd mechanism?

Doesn't your program mask those signals before submitting URBs?  It
must; otherwise the completion signals would be delivered to the
program in the normal way via a signal handler instead of being
reported via signalfd.

The signals remain masked even after the file descriptor is closed.  
Opening or closing a signalfd descriptor doesn't change the set of
masked signals -- not according to the man page entry, anyway.

Signals don't remain pending within the signalfd mechanism; they just
remain pending.  They operate more or less independently of signalfd.  
The only purpose of signalfd is to _report_ pending signals.  It
doesn't store them or anything like that.  The only interaction is 
this: When the program reads from signalfd that a signal is pending, 
the signal then becomes unpending (just as if the program's signal 
handler had run).

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux