`SignalDelivery` needs to be shareable
michalfita opened this issue · comments
Michał Fita commented
At the moment Process::fork()
seem to create the new SignalDelivery
while for proper multithreading we have to have shared access to signal handlers following clone(2) semantics supported by the Linux Kernel.
Found during work on #88 and belongs to Multithreading milestone (I can't add myself).
More details in the flags mask of clone(2), scroll down to CLONE_SIGHAND. I haven't checked yet how it's implemented in Linux Kernel.
Seiya Nuta commented
I think we need to do so too. Let's replace wrap signals
field in Process
with Arc
, especially: Arc<SpinLock<SignalDelivery>>
.