| version 1.8, 2002/02/25 18:45:53 |
version 1.9, 2002/04/10 19:17:51 |
|
|
| #include <cfg/str/strdyn.h> |
#include <cfg/str/strdyn.h> |
| |
|
| #include "process.h" |
#include "process.h" |
| #include "message.h" |
#include "message.h" /* msg_*_print() */ |
| |
#include "conf.h" /* cfg */ |
| |
|
| |
|
| void |
void |
| Line 63 process_destroy(proc) |
|
| Line 64 process_destroy(proc) |
|
| |
|
| #if 0 && DEBUG |
#if 0 && DEBUG |
| msg_debug_print("process_destroy(): proc->fd[%d] = %p\n", |
msg_debug_print("process_destroy(): proc->fd[%d] = %p\n", |
| k, proc->fd[k].link); |
k, proc->fd[k].link); |
| #endif |
#endif |
| |
if (proc->fd[k].n_link > 0 && ! cfg.silent) |
| |
msg_warn_print("process_destroy(): removing process %p with %d" |
| |
" active links in fd %d\n", proc, proc->fd[k].n_link, k); |
| |
|
| if (proc->fd[k].link != NULL) |
if (proc->fd[k].link != NULL) |
| free(proc->fd[k].link); |
free(proc->fd[k].link); |
| |
|
| Line 123 process_print_cmdline(proc) |
|
| Line 128 process_print_cmdline(proc) |
|
| |
|
| if (proc == NULL) { |
if (proc == NULL) { |
| msg_warn_print("NULL struct process pointer in " |
msg_warn_print("NULL struct process pointer in " |
| "process_print_cmdline()\n"); |
"process_print_cmdline()\n"); |
| return; |
return; |
| } |
} |
| |
|
| Line 142 process_print_names(proc) |
|
| Line 147 process_print_names(proc) |
|
| |
|
| if (proc == NULL) { |
if (proc == NULL) { |
| msg_warn_print("NULL struct process pointer in " |
msg_warn_print("NULL struct process pointer in " |
| "process_print_names()\n"); |
"process_print_names()\n"); |
| return; |
return; |
| } |
} |
| |
|
| Line 164 process_print_struct(proc) |
|
| Line 169 process_print_struct(proc) |
|
| |
|
| if (proc == NULL) { |
if (proc == NULL) { |
| msg_warn_print("NULL struct process pointer in " |
msg_warn_print("NULL struct process pointer in " |
| "process_print_struct()\n"); |
"process_print_struct()\n"); |
| |
|
| return; |
return; |
| } |
} |
| Line 177 process_print_struct(proc) |
|
| Line 182 process_print_struct(proc) |
|
| |
|
| for (i = 0; i < N_FD; i++) |
for (i = 0; i < N_FD; i++) |
| msg_print("\n\tfd[%d].pipe = (%d, %d)",i, |
msg_print("\n\tfd[%d].pipe = (%d, %d)",i, |
| fstat(proc->fd[i].pipe[0], &buf), |
fstat(proc->fd[i].pipe[0], &buf), |
| fstat(proc->fd[i].pipe[1], &buf)); |
fstat(proc->fd[i].pipe[1], &buf)); |
| } |
} |
| |
|
| void |
void |