version 1.14, 2002/05/27 03:14:22 |
version 1.15, 2002/06/12 06:07:16 |
|
|
*/ |
*/ |
extern void coredump() |
extern void coredump() |
{ |
{ |
error("Segmentation violation - dumping core [PID = %d, %s]", |
error("Segmentation violation - dumping core [PID = %ld, %s]", |
getpid(), |
(long)getpid(), |
(isserver) ? "isserver" : ((amchild) ? "amchild" : "parent")); |
(isserver) ? "isserver" : ((amchild) ? "amchild" : "parent")); |
abort(); |
abort(); |
/*NOTREACHED*/ |
/*NOTREACHED*/ |
|
|
void runcommand(cmd) |
void runcommand(cmd) |
char *cmd; |
char *cmd; |
{ |
{ |
int fd[2], pid, i; |
int fd[2]; |
int status; |
int status; |
char *cp, *s; |
char *cp, *s; |
char sbuf[BUFSIZ], buf[BUFSIZ]; |
char sbuf[BUFSIZ], buf[BUFSIZ]; |
|
pid_t pid, i; |
|
|
if (pipe(fd) < 0) { |
if (pipe(fd) < 0) { |
error("pipe of %s failed: %s", cmd, SYSERR); |
error("pipe of %s failed: %s", cmd, SYSERR); |
return; |
return; |