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