[FFmpeg-devel] [PATCH] ffmpeg.c: use sigterm_handler with sigpipe

Nicolas George george at nsup.org
Fri Jan 12 00:51:34 EET 2018

Moritz Barsnick (2018-01-11):
> This patch doesn't change the handling of SIGTERM

You should have read SIGPIPE, obviously.

> Is SIGPIPE an interactive signal?

Of course not.

>				    Anything on the other side of output
> file(name) "-" or "pipe:N" may terminate for some reason.

Yes, that is exactly what SIGPIPE is for.

> This patch does NOT try to ignore anything. ffmpeg won't keep running
> due to ignoring of SIGPIPE, it will terminate more cleanly due to
> handling it. The former is not desired. (But yes, shall handing to
> enforce ignoring it would allow that.)

It will terminate less cleanly than if you do the right thing with

Basic rule of Unix programming: don't mess with signals unless you are
very sure of what you are doing. And even in that case, hesitate.


  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20180111/c20e7da8/attachment.sig>

More information about the ffmpeg-devel mailing list