| version 1.25, 2002/05/27 20:04:20 |
version 1.26, 2002/05/29 15:12:55 |
| Line 649 proctable_read(p_ptbl, p_rfds, p_wfds, p |
|
| Line 649 proctable_read(p_ptbl, p_rfds, p_wfds, p |
|
| filedescriptor. */ |
filedescriptor. */ |
| |
|
| proctable_remove_process_fd_links(*p_ptbl, i, k); |
proctable_remove_process_fd_links(*p_ptbl, i, k); |
| |
|
| } |
} |
| else { |
else { |
| /* Variable datasize is not 0. Data were recieved. |
/* Variable datasize is not 0. Data were recieved. |
| Line 670 proctable_read(p_ptbl, p_rfds, p_wfds, p |
|
| Line 669 proctable_read(p_ptbl, p_rfds, p_wfds, p |
|
| #endif |
#endif |
| switch (write(fd_write, buf, datasize)) { |
switch (write(fd_write, buf, datasize)) { |
| case -1: |
case -1: |
| |
/* This is some special case. We are writting |
| |
to filedescriptor,which probably desn't exists |
| |
(ie. due to child exit). With signal handling |
| |
and appropriate testing after select() return |
| |
we should never get here. But if signals are |
| |
not used, this situation is quite common |
| |
|
| |
ep: debug: proctable_read(): write() failed: Broken pipe |
| |
|
| |
So that descriptor is not usable anymore. |
| |
We will remove its proclinks. */ |
| |
|
| #if DEBUG |
#if DEBUG |
| msg_debug_print("proctable_read(): " |
msg_debug_print("proctable_read(): " |
| "write() failed: %s\n", |
"write() failed: %s\n", |
| strerror(errno)); |
strerror(errno)); |
| #endif |
#endif |
| |
|
| |
proctable_remove_process_fd_links(*p_ptbl, proc_id, fd_id); |
| break; |
break; |
| case 0: |
case 0: /* Similar situation as -1 above */ |
| #if DEBUG |
#if DEBUG |
| msg_debug_print("proctable_read(): " |
msg_debug_print("proctable_read(): " |
| "write() returns 0: %s\n", |
"write() returns 0: %s\n", |
| strerror(errno)); |
strerror(errno)); |
| #endif |
#endif |
| |
proctable_remove_process_fd_links(*p_ptbl, proc_id, fd_id); |
| break; |
break; |
| default: |
default: |
| break; |
break; |