5 /* (c) Copyright 1988 by the Massachusetts Institute of Technology. */
6 /* For copying and distribution information, please see the file */
7 /* <mit-copyright.h>. */
10 static char *rcsid_exec_002_c = "$Header$";
13 #include <mit-copyright.h>
15 #include <sys/types.h>
22 extern CONNECTION conn;
23 extern int code, errno;
35 mask = sigblock(sigmask(SIGCHLD));
41 log_priority = log_ERROR;
42 com_err(whoami, errno, ": can't fork to run install script");
43 code = send_object(conn, (char *)&n, INTEGER_T);
49 execlp(str, str, (char *)NULL);
52 log_priority = log_ERROR;
53 com_err(whoami, n, ": %s", str);
54 (void) send_object(conn, (char *)&n, INTEGER_T);
59 } while (n != -1 && n != pid);
62 n = waitb.w_retcode + ERROR_TABLE_BASE_sms;
63 log_priority = log_ERROR;
64 com_err(whoami, n, " child exited with status %d", waitb.w_retcode);
65 code = send_object(conn, (char *)&n, INTEGER_T);