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

2018-01-18 Thread Mark Thompson
On 18/01/18 16:02, Carl Eugen Hoyos wrote: > 2018-01-18 16:55 GMT+01:00 Mark Thompson : > >> Setting the termination option in the ffmpeg program or not shouldn't >> make a difference to the behaviour inside the muxer > > How did you test this? The signal is received by a write

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

2018-01-18 Thread Mark Thompson
On 18/01/18 15:58, Nicolas George wrote: > Mark Thompson (2018-01-18): >> Changing it to ignore the signal (set it to SIG_IGN) instead sounds >> like a safer option? > > Yes, I think it would be somewhat safer. And it can be done without > modification to FFmpeg. To clarify: I was definitely

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

2018-01-18 Thread wm4
On Thu, 18 Jan 2018 16:30:22 +0100 Carl Eugen Hoyos wrote: > 2018-01-18 16:27 GMT+01:00 Nicolas George : > > Carl Eugen Hoyos (2018-01-18): > >> Could you please tell us which cases get broken? > > > > I cannot. > > Ok. > > So we both agree that

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

2018-01-18 Thread Carl Eugen Hoyos
2018-01-18 16:55 GMT+01:00 Mark Thompson : > Setting the termination option in the ffmpeg program or not shouldn't > make a difference to the behaviour inside the muxer How did you test this? Carl Eugen ___ ffmpeg-devel mailing list

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

2018-01-18 Thread Nicolas George
Mark Thompson (2018-01-18): > Changing it to ignore the signal (set it to SIG_IGN) instead sounds > like a safer option? Yes, I think it would be somewhat safer. And it can be done without modification to FFmpeg. What is missing, though, is better control on error conditions: when muxing in one

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

2018-01-18 Thread Mark Thompson
On 18/01/18 14:49, Dave Rice wrote: > Thread bump. > >> On Jan 11, 2018, at 5:51 PM, Nicolas George wrote: >> >> Moritz Barsnick (2018-01-11): >>> This patch doesn't change the handling of SIGTERM >> >> You should have read SIGPIPE, obviously. >> >>> Is SIGPIPE an interactive

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

2018-01-18 Thread Nicolas George
Carl Eugen Hoyos (2018-01-18): > We have disagreed in the past about pkg-config, > you don't want me to test FFmpeg on less common > systems, fine. This is untrue. I have offered you help to find a work-flow to test FFmpeg on less common systems while playing nice with pkg-config, but you never

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

2018-01-18 Thread Paul B Mahol
On 1/18/18, Nicolas George wrote: > Carl Eugen Hoyos (2018-01-18): >> Could you please tell us which cases get broken? > > I cannot. But these are Unix signals: there are. Just ignore Nicolas, he doesn't know any better. ___

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

2018-01-18 Thread Carl Eugen Hoyos
2018-01-18 16:27 GMT+01:00 Nicolas George : > Carl Eugen Hoyos (2018-01-18): >> Could you please tell us which cases get broken? > > I cannot. Ok. So we both agree that FFmpeg should get rid of Vincent as fast as possible. We have disagreed in the past about pkg-config, you

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

2018-01-18 Thread Nicolas George
Carl Eugen Hoyos (2018-01-18): > Could you please tell us which cases get broken? I cannot. But these are Unix signals: there are. Regards, -- Nicolas George signature.asc Description: Digital signature ___ ffmpeg-devel mailing list

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

2018-01-18 Thread Carl Eugen Hoyos
2018-01-18 16:19 GMT+01:00 Nicolas George : > Carl Eugen Hoyos (2018-01-18): >> The OP has created a very easy to reproduce case where >> FFmpeg unexpectedly doesn't close its output files, and >> a patch that fixes this (broken) behaviour. > > And the OP neglected to check that

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

2018-01-18 Thread Nicolas George
Carl Eugen Hoyos (2018-01-18): > The OP has created a very easy to reproduce case where > FFmpeg unexpectedly doesn't close its output files, and > a patch that fixes this (broken) behaviour. And the OP neglected to check that the patch does not break other cases. > Why do you believe there is

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

2018-01-18 Thread Carl Eugen Hoyos
2018-01-18 16:05 GMT+01:00 Nicolas George : > Carl Eugen Hoyos (2018-01-18): >> Would you like to elaborate? > > Of course, provided somebody is interested. > > Issuing the following command: > > trap "" SIGPIPE > > will ignore SIGPIPE in the shell and all subsequent

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

2018-01-18 Thread Nicolas George
Carl Eugen Hoyos (2018-01-18): > Would you like to elaborate? Of course, provided somebody is interested. Issuing the following command: trap "" SIGPIPE will ignore SIGPIPE in the shell and all subsequent programs started from it. It will achieve exactly the result of this patch, in a

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

2018-01-18 Thread wm4
On Thu, 18 Jan 2018 15:54:46 +0100 Nicolas George wrote: > Dave Rice (2018-01-18): > > Not sure if I understand well the disadvantage of this patch. > > When dealing with Unix signals, "not sure if I understand" means > "don't". Well, he's asking you why. If you refuse to

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

2018-01-18 Thread Carl Eugen Hoyos
2018-01-18 15:54 GMT+01:00 Nicolas George : > The same result can be achieved with the shell Would you like to elaborate? > without the corresponding drawbacks. Maybe you could explain the drawbacks? Exiting FFmpeg without closing output files seems like a major drawback to

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

2018-01-18 Thread Nicolas George
Dave Rice (2018-01-18): > Not sure if I understand well the disadvantage of this patch. When dealing with Unix signals, "not sure if I understand" means "don't". The same result can be achieved with the shell, without the corresponding drawbacks. Regards, -- Nicolas George signature.asc

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

2018-01-18 Thread Dave Rice
Thread bump. > On Jan 11, 2018, at 5:51 PM, Nicolas George wrote: > > 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. > >>

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

2018-01-11 Thread Nicolas George
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

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

2018-01-11 Thread Moritz Barsnick
On Thu, Jan 11, 2018 at 22:43:48 +0100, Nicolas George wrote: > 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. This patch doesn't change the handling

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

2018-01-11 Thread Moritz Barsnick
On Thu, Jan 11, 2018 at 16:20:04 -0500, Dave Rice wrote: > Based on a suggestion by Moritz Barsnick at > http://ffmpeg.org/pipermail/ffmpeg-user/2018-January/038549.html > That's me. > signal(SIGINT , sigterm_handler); /*

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

2018-01-11 Thread Nicolas George
Dave Rice (2018-01-11): > From 0faa2954010feb8428542fc33aa81e898a280c88 Mon Sep 17 00:00:00 2001 > From: Dave Rice > 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 >

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

2018-01-11 Thread Dave Rice
From 0faa2954010feb8428542fc33aa81e898a280c88 Mon Sep 17 00:00:00 2001 From: Dave Rice 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