+ Fixed bug in set-process-group
+ include <string.h> + save errno before starting timer interrupts
This commit is contained in:
parent
65407be26c
commit
e316ce1109
|
@ -143,7 +143,7 @@
|
||||||
|
|
||||||
(import-os-error-syscall process-group () "scsh_getpgrp")
|
(import-os-error-syscall process-group () "scsh_getpgrp")
|
||||||
|
|
||||||
(import-os-error-syscall %set-process-group (pid groupid) "setpgid")
|
(import-os-error-syscall %set-process-group (pid groupid) "scsh_setpgid")
|
||||||
|
|
||||||
(define (set-process-group arg1 . maybe-arg2)
|
(define (set-process-group arg1 . maybe-arg2)
|
||||||
(receive (pid pgrp) (if (null? maybe-arg2)
|
(receive (pid pgrp) (if (null? maybe-arg2)
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <sys/signal.h>
|
#include <sys/signal.h>
|
||||||
|
#include <signal.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/times.h>
|
#include <sys/times.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
@ -127,8 +128,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);
|
||||||
}
|
}
|
||||||
|
@ -982,7 +983,7 @@ void s48_init_syscalls (){
|
||||||
S48_EXPORT_FUNCTION(scsh_getpid);
|
S48_EXPORT_FUNCTION(scsh_getpid);
|
||||||
S48_EXPORT_FUNCTION(scsh_getppid);
|
S48_EXPORT_FUNCTION(scsh_getppid);
|
||||||
S48_EXPORT_FUNCTION(scsh_getpgrp);
|
S48_EXPORT_FUNCTION(scsh_getpgrp);
|
||||||
S48_EXPORT_FUNCTION(setpgid);
|
S48_EXPORT_FUNCTION(scsh_setpgid);
|
||||||
S48_EXPORT_FUNCTION(scsh_setsid);
|
S48_EXPORT_FUNCTION(scsh_setsid);
|
||||||
S48_EXPORT_FUNCTION(scsh_umask);
|
S48_EXPORT_FUNCTION(scsh_umask);
|
||||||
S48_EXPORT_FUNCTION(process_times);
|
S48_EXPORT_FUNCTION(process_times);
|
||||||
|
|
Loading…
Reference in New Issue