Skip to main content
Formatting
Source Link
jasonwryan
  • 74.8k
  • 35
  • 204
  • 230

Process does not close on broken pipe. Why?

I am starting following command from a bash script (arguments omitted for simplicity)

avconv | sox | nc

avconv | sox | nc

I am starting about 150 such commands on the same box at the same time.

The last ncnc command sends the stream to another host. When that host dies, ncnc dies but avconvavconv and soxsox can stay alive. When I then killall soxkillall sox in this situation, avconvavconv stays alive.

Should there not be a sigpipesigpipe?

When I execute the bash script manually and ncnc dies, the other two processes die too. But not when I start many such scripts .

Is it possible that sigpipesigpipe does not work when pipe buffers are full or the system is otherwise highly contended? How can I work around it?

Thanks

Process does not close on broken pipe. Why?

I am starting following command from a bash script (arguments omitted for simplicity)

avconv | sox | nc

I am starting about 150 such commands on the same box at the same time.

The last nc command sends the stream to another host. When that host dies, nc dies but avconv and sox can stay alive. When I then killall sox in this situation, avconv stays alive.

Should there not be a sigpipe?

When I execute the bash script manually and nc dies, the other two processes die too. But not when I start many such scripts .

Is it possible that sigpipe does not work when pipe buffers are full or the system is otherwise highly contended? How can I work around it?

Thanks

Process does not close on broken pipe

I am starting following command from a bash script (arguments omitted for simplicity)

avconv | sox | nc

I am starting about 150 such commands on the same box at the same time.

The last nc command sends the stream to another host. When that host dies, nc dies but avconv and sox can stay alive. When I then killall sox in this situation, avconv stays alive.

Should there not be a sigpipe?

When I execute the bash script manually and nc dies, the other two processes die too. But not when I start many such scripts .

Is it possible that sigpipe does not work when pipe buffers are full or the system is otherwise highly contended? How can I work around it?

Source Link
Tynix
  • 73
  • 6

Process does not close on broken pipe. Why?

I am starting following command from a bash script (arguments omitted for simplicity)

avconv | sox | nc

I am starting about 150 such commands on the same box at the same time.

The last nc command sends the stream to another host. When that host dies, nc dies but avconv and sox can stay alive. When I then killall sox in this situation, avconv stays alive.

Should there not be a sigpipe?

When I execute the bash script manually and nc dies, the other two processes die too. But not when I start many such scripts .

Is it possible that sigpipe does not work when pipe buffers are full or the system is otherwise highly contended? How can I work around it?

Thanks