version 1.33, 2003/06/03 02:56:11 |
version 1.34, 2004/09/15 22:21:11 |
|
|
child_freelist = cp; |
child_freelist = cp; |
} |
} |
|
|
|
/* ARGSUSED */ |
void |
void |
sigchild(int signo) |
sigchild(int signo) |
{ |
{ |
|
|
struct child *cp; |
struct child *cp; |
int save_errno = errno; |
int save_errno = errno; |
|
|
while ((pid = |
while ((pid = waitpid((pid_t)-1, &status, WNOHANG)) > 0) { |
waitpid((pid_t)-1, &status, WNOHANG)) > 0) { |
|
cp = findchild(pid, 1); |
cp = findchild(pid, 1); |
if (!cp) |
if (!cp) |
continue; |
continue; |
|
|
handle_spool_locks(int action) |
handle_spool_locks(int action) |
{ |
{ |
static FILE *lockfp = NULL; |
static FILE *lockfp = NULL; |
static pid_t lock_pid; |
|
|
|
if (action == 0) { |
if (action == 0) { |
/* Clear the lock */ |
/* Clear the lock */ |
|
|
lockfp = NULL; |
lockfp = NULL; |
return(0); |
return(0); |
} |
} |
lock_pid = fp_head->pid; /* new entries added at head */ |
|
} else { |
} else { |
(void)fprintf(stderr, "handle_spool_locks: unknown action %d\n", |
(void)fprintf(stderr, "handle_spool_locks: unknown action %d\n", |
action); |
action); |