more thread work to cean-up mutexes. Not finshed yet

This commit is contained in:
Vitor Santos Costa
2014-11-25 19:52:51 +00:00
parent afc6c5d04e
commit 624183b78e
8 changed files with 83 additions and 453 deletions

View File

@@ -2384,6 +2384,7 @@ argument to wait()
#endif /*HAVE_SYS_WAIT_H*/
typedef sighandler_t sigf_t;
int
System(char *cmd)
@@ -2391,9 +2392,8 @@ System(char *cmd)
int pid;
char *shell = "/bin/sh";
int rval;
void (*old_int)();
void (*old_stop)();
sigf_t old_int, old_stop;
if ( (pid = fork()) == -1 )
{ return PL_error("shell", 2, OsError(), ERR_SYSCALL, "fork");
} else if ( pid == 0 ) /* The child */
@@ -2407,9 +2407,9 @@ System(char *cmd)
{ wait_t status; /* the parent */
int n;
old_int = signal(SIGINT, SIG_IGN);
old_int = (sigf_t)signal(SIGINT, SIG_IGN);
#ifdef SIGTSTP
old_stop = signal(SIGTSTP, SIG_DFL);
old_stop = (sigf_t)signal(SIGTSTP, SIG_DFL);
#endif /* SIGTSTP */
for(;;)