由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Linux版 - How to debug "broken pipe" in linux programming ?
相关主题
xterm got kill when i run my application, how come ?100伪币答谢Linux/Unix编程问题
grep 的很奇怪的现象screen里如何给所有窗口发送同一个msg?
有没有vim给程序员的入门教程?主要用c.发包子 echo 求助
[请教]文件输入 (转载)Inter-thread pipe会写磁盘吗?
如何能让mitbbs RSS输出 (转载)how can python code wait for signal from a c code program ?
请教一个shell的问题Linux Hosting---CloudatCost --- $35 ONE TIME COST
怎么转换一批文件?(NEF to jpg)没有root权限怎么安装gcc (RHEL)
A question about two linux commandsbuild image with debug info, can you build the debug symbol only ?
相关话题的讨论汇总
话题: pipe话题: debug话题: broken话题: pclose
进入Linux版参与讨论
1 (共1页)
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

1 (共1页)
进入Linux版参与讨论
相关主题
build image with debug info, can you build the debug symbol only ?如何能让mitbbs RSS输出 (转载)
Any detailed instruction to remote debug shared library in QtCreator in Linux ?请教一个shell的问题
Firefox 4 RC 不错怎么转换一批文件?(NEF to jpg)
如何确保多线程程序在 multicore server 用所有 coreA question about two linux commands
xterm got kill when i run my application, how come ?100伪币答谢Linux/Unix编程问题
grep 的很奇怪的现象screen里如何给所有窗口发送同一个msg?
有没有vim给程序员的入门教程?主要用c.发包子 echo 求助
[请教]文件输入 (转载)Inter-thread pipe会写磁盘吗?
相关话题的讨论汇总
话题: pipe话题: debug话题: broken话题: pclose