nuta / kerla

A new operating system kernel with Linux binary compatibility written in Rust.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`SignalDelivery` needs to be shareable

michalfita opened this issue · comments

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.

I think we need to do so too. Let's replace wrap signals field in Process with Arc, especially: Arc<SpinLock<SignalDelivery>>.