Web lists-archives.com

[MPlayer-dev-eng] [PATCH] Support for nohup in mplayer




Hello,

Here is attached a little patch allowing mplayer to inherit a
nohup setting. This can be useful when this one is used in slave
mode and you don't want xinit or xterm to shut it down.

++
Seb.
--- mplayer.c.orig	2016-03-06 14:00:49.000000000 +0100
+++ mplayer.c	2016-07-25 11:39:10.234979743 +0200
@@ -3048,7 +3048,8 @@
     //========= Catch terminate signals: ================
     // terminate requests:
     signal(SIGTERM, exit_sighandler); // kill
-    signal(SIGHUP, exit_sighandler); // kill -HUP  /  xterm closed
+    if (signal(SIGHUP, exit_sighandler) == SIG_IGN) // kill -HUP  /  xterm closed
+       signal(SIGHUP, SIG_IGN); // honor the inherited "nohup" setting.
 
     signal(SIGINT, exit_sighandler); // Interrupt from keyboard
 
_______________________________________________
MPlayer-dev-eng mailing list
MPlayer-dev-eng@xxxxxxxxxxxx
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng