+ Don't raise an error on ECHILD since ECHILD just indicates that
there are no childs ready. + Squirrel away errno before starting alarm interrupts
This commit is contained in:
parent
da9c6ba9b5
commit
7acad294ac
|
@ -71,10 +71,12 @@ s48_value wait_pid(s48_value s48_pid, s48_value s48_flags)
|
||||||
|
|
||||||
result_pid = waitpid(pid, &status, flags);
|
result_pid = waitpid(pid, &status, flags);
|
||||||
if (result_pid == -1)
|
if (result_pid == -1)
|
||||||
s48_raise_os_error_2 (errno, s48_pid, s48_flags);
|
if (errno == ECHILD) sch_result_pid = s48_enter_fixnum (0);
|
||||||
|
else s48_raise_os_error_2 (errno, s48_pid, s48_flags);
|
||||||
sch_result_pid = s48_enter_integer (result_pid);
|
else {
|
||||||
sch_status = s48_enter_integer (status);
|
sch_result_pid = s48_enter_integer (result_pid);
|
||||||
|
sch_status = s48_enter_integer (status);
|
||||||
|
}
|
||||||
sch_status_list = s48_cons (sch_status, S48_NULL);
|
sch_status_list = s48_cons (sch_status, S48_NULL);
|
||||||
sch_retval = s48_cons (sch_result_pid, sch_status_list);
|
sch_retval = s48_cons (sch_result_pid, sch_status_list);
|
||||||
|
|
||||||
|
@ -124,8 +126,8 @@ s48_value scheme_exec(s48_value prog, s48_value argv, s48_value env)
|
||||||
}
|
}
|
||||||
s48_stop_alarm_interrupts();
|
s48_stop_alarm_interrupts();
|
||||||
execve(s48_extract_string (prog), unix_argv, unix_env); /* Do it. */
|
execve(s48_extract_string (prog), unix_argv, unix_env); /* Do it. */
|
||||||
s48_start_alarm_interrupts();
|
|
||||||
e = errno;
|
e = errno;
|
||||||
|
s48_start_alarm_interrupts();
|
||||||
if( env != S48_TRUE ) {
|
if( env != S48_TRUE ) {
|
||||||
Free(unix_env);
|
Free(unix_env);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue