Displaying 2 results from an estimated 2 matches for "pid_status".
Did you mean:
mic_status
2002 Sep 03
2
[patch] for rsync
...below allows the sigchld_handler to save
the status of up to 10 child processes and make them available
for use by wait_process.
I hope I've done this right. Thanks for your help JW.
Dave
----------------------------------------------------------------------------------
29a30,34
> struct pid_status {
> pid_t pid;
> int status;
> } pid_stat_table[10];
>
37c42,47
< while (waitpid(pid, status, WNOHANG) == 0) {
---
> pid_t waited_pid;
> int cnt;
>
> while ( 1 ) {
> waited_pid = waitpid(pid, status, WNOHANG);
> if ( waited_pid...
2002 Sep 01
2
rsync error: unexplained error
...this problem.
I can be reached at drstaples@beckman.com; drstaples@drstaples.com; or drstapl@empirenet.com
Sincerely,
David R. Staples
--------------------------------------------------------------------------------
Proposed new code in main.c
#typedef struct
int pid;
int status;
} pid_status;
pid_status pid_stat_table[10];
static RETSIGTYPE sigchld_handler(int val) {
#ifdef WNOHANG
int indx
int pid;
int status;
do {
pid = waitpid(-1, &status, WNOHANG);
for ( indx = 0; indx < 10; indx++ ) {
if (...