X-Git-Url: http://nitlanguage.org diff --git a/lib/standard/exec_nit.c b/lib/standard/exec_nit.c index 9b6a5e4..317e909 100644 --- a/lib/standard/exec_nit.c +++ b/lib/standard/exec_nit.c @@ -15,6 +15,7 @@ #include #include #include +#include se_exec_data_t* exec_Process_Process_basic_exec_execute_4(void *s, char *prog, char *args, int len, int pipeflag) { se_exec_data_t* result = NULL; @@ -25,22 +26,19 @@ se_exec_data_t* exec_Process_Process_basic_exec_execute_4(void *s, char *prog, c if (pipeflag & 1) { int res = pipe(in_fd); if ( res == -1 ) { - fprintf( stderr, "Pipe init failed in Process:basic_exec_execute: %s\n", strerror( errno ) ); - exit(1); + return NULL; } } if (pipeflag & 2) { int res = pipe(out_fd); if ( res == -1 ) { - fprintf( stderr, "Pipe init failed in Process:basic_exec_execute: %s\n", strerror( errno ) ); - exit(1); + return NULL; } } if (pipeflag & 4) { int res = pipe(err_fd); if ( res == -1 ) { - fprintf( stderr, "Pipe init failed in Process:basic_exec_execute: %s\n", strerror( errno ) ); - exit(1); + return NULL; } } @@ -84,7 +82,7 @@ se_exec_data_t* exec_Process_Process_basic_exec_execute_4(void *s, char *prog, c /* calls */ execvp(prog, arg); - abort(); + _exit(127); } else if (id > 0) { /* father */