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

Nicolas George george at nsup.org
Thu Jan 11 23:43:48 EET 2018


Dave Rice (2018-01-11):
> From 0faa2954010feb8428542fc33aa81e898a280c88 Mon Sep 17 00:00:00 2001
> From: Dave Rice <dave at dericed.com>
> Date: Thu, 11 Jan 2018 15:52:36 -0500
> Subject: [PATCH] ffmpeg.c: use sigterm_handler with sigpipe
> 
> Based on a suggestion by Moritz Barsnick at http://ffmpeg.org/pipermail/ffmpeg-user/2018-January/038549.html <http://ffmpeg.org/pipermail/ffmpeg-user/2018-January/038549.html>

SIGTERM is there for a reason. It prevents programs whose output was
closed from continuing needlessly. Ignoring it unconditionally will lose
that property, which is desirable in most cases.

Furthermore, the signal handler you are proposing is designed for
interactive signals and will probably not give the results you want in
this case.

Just use your shell to set it to SIG_IGN when necessary.

Regards,

-- 
  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/71b2674c/attachment.sig>


More information about the ffmpeg-devel mailing list