2 * Copyright 1993, 1995 Christopher Seiwald.
4 * This file is part of Jam - see jam.c for Copyright information.
15 * execunix.c - execute a shell script on UNIX
17 * If $(JAMSHELL) is defined, uses that to formulate execvp().
22 * Each word must be an individual element in a jam variable value.
24 * In $(JAMSHELL), % expands to the command string and ! expands to
25 * the slot number (starting at 1) for multiprocess (-j) invocations.
26 * If $(JAMSHELL) doesn't include a %, it is tacked on as the last
29 * Don't just set JAMSHELL to /bin/sh - it won't work!
32 * exec_cmd() - launch an async command execution.
33 * exec_wait() - wait and drive at most one execution completion.
36 * onintr() - bump intr to note command interruption.
38 * 04/08/94 (seiwald) - Coherent/386 support added.
39 * 05/04/94 (seiwald) - async multiprocess interface
40 * 01/22/95 (seiwald) - $(JAMSHELL) support
45 * exec_cmd() - launch an async command execution.
51 void (* func)( void * closure, int status, timing_info *, char *, char * ),
56 printf( "%s", string );
57 (*func)( closure, EXEC_CMD_OK );
61 * exec_wait() - wait and drive at most one execution completion.