mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-01 02:02:28 +00:00
Put more thought into new signaling code
This commit is contained in:
parent
6107eb38f9
commit
f68fc1f815
10 changed files with 127 additions and 51 deletions
|
@ -29,6 +29,17 @@
|
|||
* The impact of this action can be terminating the process, or
|
||||
* interrupting it to request something happen.
|
||||
*
|
||||
* On Windows, signals are delivered between processes using shared
|
||||
* memory files stored in C:\ProgramData\cosmo\sig\x\y.pid which hold
|
||||
* the process signal mask. Any process that can access these files can
|
||||
* signal a cosmo process. The targeting process will then notice that a
|
||||
* signal has been added and delivers to any thread as soon as possible.
|
||||
*
|
||||
* On Windows, the concept of a process group isn't fully implemented.
|
||||
* Saying `kill(0, sig)` will deliver `sig` to all direct descendent
|
||||
* processes. Saying `kill(-pid, sig)` will be the same as saying
|
||||
* `kill(pid, sig)`.
|
||||
*
|
||||
* @param pid can be:
|
||||
* >0 signals one process by id
|
||||
* =0 signals all processes in current process group
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue