From 9cd01958da86a68d0e47defcb9745ab373ef3d79 Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Sat, 21 Sep 2013 15:23:05 -0400 Subject: Ensure that stderr from shell functions in recipes is synced. --- job.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'job.h') diff --git a/job.h b/job.h index 967fa2b..c9cb7fa 100644 --- a/job.h +++ b/job.h @@ -123,10 +123,17 @@ char **construct_command_argv (char *line, char **restp, struct file *file, int cmd_flags, char** batch_file); #ifdef VMS int child_execute_job (char *argv, struct child *child); -#elif defined(__EMX__) -int child_execute_job (int stdin_fd, int stdout_fd, char **argv, char **envp); #else -void child_execute_job (int stdin_fd, int stdout_fd, char **argv, char **envp); +# define FD_STDIN (fileno (stdin)) +# define FD_STDOUT (fileno (stdout)) +# define FD_STDERR (fileno (stderr)) +# if defined(__EMX__) +int child_execute_job (int stdin_fd, int stdout_fd, int stderr_fd, + char **argv, char **envp) +# else +void child_execute_job (int stdin_fd, int stdout_fd, int stderr_fd, + char **argv, char **envp) __attribute__ ((noreturn)); +# endif #endif #ifdef _AMIGA void exec_command (char **argv) __attribute__ ((noreturn)); -- cgit v1.2.3