kill a process started with popen

前端 未结 8 1321
温柔的废话
温柔的废话 2020-12-04 15:04

After opening a pipe to a process with popen, is there a way to kill the process that has been started? (Using pclose is not what I want because th

8条回答
  •  有刺的猬
    2020-12-04 15:35

    Actually if the process is doing I/O (which it should be, otherwise why popen instead of system(3)?), then pclose should whack it with a SIGPIPE the next time it tries to read or write, and it should fall over nicely :-)

提交回复
热议问题