w*s 发帖数: 7227 | 1 hi we have complicated multithread code, as most companies do.
Now under stress test we have broken pipe.
How to debug this pls ?
Q1:
if in the popen, pclose case,
http://www.crasseux.com/books/ctutorial/Programming-with-pipes.
if 1 thread is exiting, it can check all opening pipes associating with it,
can it ?
if pipes still open, then wait till the other side finishes,
then exit this thread gracefully
Can this work ?
Q2:
if someone uses pipe();
http://linuxprograms.wordpress.com/2008/02/15/using-pipes-in-li
seems it never need to close pipe, then what to do ? | r****t 发帖数: 10904 | 2 manpage says pclose will wait for the other side to terminate, so the when
the other side quits, pclose will return. | m******n 发帖数: 1691 | 3 i read only your title.
the answer is: printf
,
【在 w*s 的大作中提到】 : hi we have complicated multithread code, as most companies do. : Now under stress test we have broken pipe. : How to debug this pls ? : Q1: : if in the popen, pclose case, : http://www.crasseux.com/books/ctutorial/Programming-with-pipes. : if 1 thread is exiting, it can check all opening pipes associating with it, : can it ? : if pipes still open, then wait till the other side finishes, : then exit this thread gracefully
|
|