From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <ffmpeg-devel-bounces@ffmpeg.org> Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id AEB4A4D85F for <ffmpegdev@gitmailbox.com>; Sun, 20 Apr 2025 20:55:19 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 24DDD687D60; Sun, 20 Apr 2025 23:55:15 +0300 (EEST) Received: from iq.passwd.hu (iq.passwd.hu [217.27.212.140]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B67ED687C82 for <ffmpeg-devel@ffmpeg.org>; Sun, 20 Apr 2025 23:55:08 +0300 (EEST) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 1C5B2EBC0F for <ffmpeg-devel@ffmpeg.org>; Sun, 20 Apr 2025 22:52:25 +0200 (CEST) X-Virus-Scanned: amavisd-new at passwd.hu Received: from iq.passwd.hu ([127.0.0.1]) by localhost (iq.passwd.hu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Zv7TUGNHBrbt for <ffmpeg-devel@ffmpeg.org>; Sun, 20 Apr 2025 22:52:23 +0200 (CEST) Received: from iq (iq [217.27.212.140]) by iq.passwd.hu (Postfix) with ESMTPS id 0BEE5EBC09 for <ffmpeg-devel@ffmpeg.org>; Sun, 20 Apr 2025 22:52:23 +0200 (CEST) Date: Sun, 20 Apr 2025 22:52:22 +0200 (CEST) From: Marton Balint <cus@passwd.hu> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> In-Reply-To: <pull.69.ffstaging.FFmpeg.1745101853603.ffmpegagent@gmail.com> Message-ID: <cfb2d90e-b912-d2b6-d716-ebd2afa61bcb@passwd.hu> References: <pull.69.ffstaging.FFmpeg.1745101853603.ffmpegagent@gmail.com> MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH] fftools/ffmpeg: Log 'EXIT' on exit X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches <ffmpeg-devel.ffmpeg.org> List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe> List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel> List-Post: <mailto:ffmpeg-devel@ffmpeg.org> List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help> List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe> Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org> Archived-At: <https://master.gitmailbox.com/ffmpegdev/cfb2d90e-b912-d2b6-d716-ebd2afa61bcb@passwd.hu/> List-Archive: <https://master.gitmailbox.com/ffmpegdev/> List-Post: <mailto:ffmpegdev@gitmailbox.com> On Sat, 19 Apr 2025, softworkz wrote: > From: softworkz <softworkz@hotmail.com> > > When viewing logs, there are situations where it is not entirely > clear whether ffmpeg CLI has exited gracefully. The two primary cases > are > > - A crash/segfault has occured > Windows for example doesn't output any message to the calling shell > - The process has been terminated (e.g. killed externally) Relying on logs alone and not checking the exit code is a bad practice, so I am not super convinced this feature is worth having. > > Printing "EXIT" on exit provides a reliable indication that the > process has exited normally. Something like this should not be visible on the default loglevel. So the loglevel should be reduced to verbose or debug. And if we print out something, then let's make it more useful and readable, e.g.: av_log(NULL, AV_LOG_VERBOSE, "Exiting with exit code %d.\n", ret); Regards, Marton > > Signed-off-by: softworkz <softworkz@hotmail.com> > --- > fftools/ffmpeg: Log 'EXIT' on exit > > When viewing logs, there are situations where it is not entirely clear > whether ffmpeg CLI has exited gracefully. The two primary cases are > > * A crash/segfault has occured Windows for example doesn't output any > message to the calling shell > * The process has been terminated (e.g. killed externally) > > Printing "EXIT" on exit provides a reliable indication that the process > has exited normally. > > Signed-off-by: softworkz softworkz@hotmail.com > > Published-As: https://github.com/ffstaging/FFmpeg/releases/tag/pr-ffstaging-69%2Fsoftworkz%2Fsubmit_exit_message-v1 > Fetch-It-Via: git fetch https://github.com/ffstaging/FFmpeg pr-ffstaging-69/softworkz/submit_exit_message-v1 > Pull-Request: https://github.com/ffstaging/FFmpeg/pull/69 > > fftools/ffmpeg.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c > index dc321fb4a2..26746699ff 100644 > --- a/fftools/ffmpeg.c > +++ b/fftools/ffmpeg.c > @@ -1012,5 +1012,8 @@ finish: > > sch_free(&sch); > > + av_log(NULL, AV_LOG_INFO, "\n"); > + av_log(NULL, AV_LOG_INFO, "EXIT\n"); > + > return ret; > } > > base-commit: 7cd1edeaa410d977a9f1ff8436f480cb45b80178 > -- > ffmpeg-codebot > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". > _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".