自己写的保护进程有异常。 为什么

自己写的保护进程有错误。 为什么
自己写的保护进程有异常。 为什么
代码是这样的 两个进程分别在另外一个进程被关闭的时候重新打开它(监视进程,防止进程被杀死的功能)
但是为什么没有输出信号处理函数sig_pipe中的那句话很是郁闷。并且执行后按ctrl+c  ctrl+\ 都没反应

还有一个问题是用ps -u 查看进程会出现自己写的保护进程有异常。 为什么
求大神给点答案啊
------解决思路----------------------
引用:
Quote: 引用:

excel will replace the child process with pro2 and the current execution on the child process is done...in other workd, excel never returns
那用ps -u查看进程 如果按下ctrl+c之后进程名为什么会出现[]带括号的名字呢


If the arguments cannot be located (usually because it has not been set, as is the case of system processes and/or kernel threads) the command name is printed within square brackets.