Work towards improving signals and processes

This commit is contained in:
Justine Tunney 2021-01-27 19:34:02 -08:00
parent de703b182c
commit d7ac16a9ed
96 changed files with 1474 additions and 427 deletions

View file

@ -19,7 +19,6 @@
#include "libc/calls/calls.h"
#include "libc/calls/internal.h"
#include "libc/dce.h"
#include "libc/sysv/errfuns.h"
/**
* Sends signal to process.
@ -39,15 +38,9 @@
* @asyncsignalsafe
*/
int kill(int pid, int sig) {
int me;
if (!IsWindows()) {
return kill$sysv(pid, sig, 1);
} else {
me = getpid();
if (!pid || pid == me || pid == -me) {
return raise(sig);
} else {
return enosys();
}
return kill$nt(pid, sig);
}
}