mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-05 02:38:31 +00:00
Add missing ICANON features
This commit is contained in:
parent
dd8544c3bd
commit
03875beadb
22 changed files with 526 additions and 251 deletions
|
@ -98,14 +98,14 @@ static int _forker(uint32_t dwCreationFlags) {
|
|||
struct timespec started;
|
||||
int ax, dx, tid, parent;
|
||||
parent = __pid;
|
||||
started = timespec_real();
|
||||
started = timespec_mono();
|
||||
_onfork_prepare();
|
||||
if (!IsWindows()) {
|
||||
ax = sys_fork();
|
||||
} else {
|
||||
ax = sys_fork_nt(dwCreationFlags);
|
||||
}
|
||||
micros = timespec_tomicros(timespec_sub(timespec_real(), started));
|
||||
micros = timespec_tomicros(timespec_sub(timespec_mono(), started));
|
||||
if (!ax) {
|
||||
|
||||
// get new process id
|
||||
|
|
|
@ -74,17 +74,14 @@ static textwindows int __proc_wait(int pid, int *wstatus, int options,
|
|||
|
||||
// check for signals and cancelation
|
||||
int sig, handler_was_called;
|
||||
if (_check_cancel() == -1) {
|
||||
if (_check_cancel() == -1)
|
||||
return -1;
|
||||
}
|
||||
if (_weaken(__sig_get) && (sig = _weaken(__sig_get)(waitmask))) {
|
||||
handler_was_called = _weaken(__sig_relay)(sig, SI_KERNEL, waitmask);
|
||||
if (_check_cancel() == -1) {
|
||||
if (_check_cancel() == -1)
|
||||
return -1; // ECANCELED because SIGTHR was just handled
|
||||
}
|
||||
if (handler_was_called & SIG_HANDLED_NO_RESTART) {
|
||||
if (handler_was_called & SIG_HANDLED_NO_RESTART)
|
||||
return eintr(); // a non-SA_RESTART handler was called
|
||||
}
|
||||
}
|
||||
|
||||
// check for zombie to harvest
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue