Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upimplement signal handling #11203
Comments
This comment has been minimized.
This comment has been minimized.
|
Nominating. |
This comment has been minimized.
This comment has been minimized.
|
Assigning P-high, not 1.0. |
pnkfelix
added
P-high
and removed
I-nominated
labels
Feb 6, 2014
This comment has been minimized.
This comment has been minimized.
|
cc me. I'm interested in working on this one. |
alexcrichton
referenced this issue
Aug 25, 2014
Closed
Signal handling not implemented for native threads #16746
thestinger
changed the title
Signal handling needs a 1:1 implementation
implement signal handling
Oct 2, 2014
This comment has been minimized.
This comment has been minimized.
|
It would be great to be able to handle signals per task. This way we could send interrupt events to running tasks (e.g. to exit a blocking syscall). Maybe a channel-like interface could allow to extend the OS-specific signal types with custom types/objects. |
This comment has been minimized.
This comment has been minimized.
This could be an interesting abstraction of |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
steveklabnik
added
the
C-enhancement
label
Mar 25, 2015
jeehoonkang
referenced this issue
Jul 28, 2015
Open
Ensure correctness in the presence of signals, mutexes & fork #2
This comment has been minimized.
This comment has been minimized.
|
Pretty sure this would go through the RFC process these days, as it's pretty huge, so moving over there rust-lang/rfcs#1368 |
alexcrichton commentedDec 30, 2013
This involves filling out
libnative/io/mod.rs, but this is also a very tricky issue. Right now the API is wrapped around what libuv provided for us, but that may not be the best API to have.Dealing with signals is always an incredibly tricky topic, and here's the ideas for what should possibly happen:
signalfdshould be used for everythingsigaction. I believe that the best way to deal with this is libuv's trick of a self-looping pipe (the signal handler writes the signal onto a pipe which is read in the "event loop"). This will certainly involve some trickiness.It has also been brought up that there are primitives like
sigwaiton unixes which can be used to just block a thread when waiting for "some group of signals", but the API which we have created for signals cannot wrap this functionality. We could add a similar function for libgreen/libnative, but I personally don't think it's worth it. It is worth some discussion, however.