1/* 2 * Copyright 1993, 1995 Christopher Seiwald. 3 * 4 * This file is part of Jam - see jam.c for Copyright information. 5 */ 6 7/* 8 * execunix.c - execute a shell script on UNIX 9 * 10 * If $(JAMSHELL) is defined, uses that to formulate execvp(). 11 * The default is: 12 * 13 * /bin/sh -c % 14 * 15 * Each word must be an individual element in a jam variable value. 16 * 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 20 * argument. 21 * 22 * Don't just set JAMSHELL to /bin/sh - it won't work! 23 * 24 * External routines: 25 * execcmd() - launch an async command execution 26 * execwait() - wait and drive at most one execution completion 27 * 28 * Internal routines: 29 * onintr() - bump intr to note command interruption 30 * 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 35 */ 36 37# include "jam.h" 38# include "lists.h" 39# include "execcmd.h" 40# include <errno.h> 41 42# ifdef OS_MAC 43 44/* 45 * execcmd() - launch an async command execution 46 */ 47 48void 49execcmd( 50 char *string, 51 void (*func)( void *closure, int status ), 52 void *closure, 53 LIST *shell ) 54{ 55 56 printf( "%s", string ); 57 (*func)( closure, EXEC_CMD_OK ); 58} 59 60/* 61 * execwait() - wait and drive at most one execution completion 62 */ 63 64int 65execwait() 66{ 67 return 0; 68} 69 70# endif /* OS_MAC */ 71