Don't use posix_spawn when file redirections are involved (except /dev/null) because the error handling is too difficult

Fix exec to correctly handle the case where a pid could not be created due to posix_spawn failing
Should fix https://github.com/fish-shell/fish-shell/issues/364
This commit is contained in:
ridiculousfish
2012-10-29 01:45:51 -07:00
parent 7c09a767b6
commit 425afa63ce
4 changed files with 50 additions and 10 deletions

3
proc.h
View File

@@ -509,6 +509,9 @@ void job_handle_signal( int signal, siginfo_t *info, void *con );
*/
int job_signal( job_t *j, int signal );
/* Marks a process as failed to execute (and therefore completed) */
void job_mark_process_as_failed( const job_t *job, process_t *p );
#ifdef HAVE__PROC_SELF_STAT
/**
Use the procfs filesystem to look up how many jiffies of cpu time