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

Alexander Strasser eclipse7 at gmx.net
Tue Jul 26 00:54:26 EEST 2016


On 2016-07-25 17:27 +0200, Nicolas George wrote:
> L'octidi 8 thermidor, an CCXXIV, Seb a écrit :
> > 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.
> 
> I do not object to the patch, but I would like to emphasize that, although a
> well established practice for a long time, using nohup is wrong.

  Hmm, I didn't know or maybe I have forgotten, that there is
special handling necessary for this to work.

  From a quick search it seems common practice to first check
if a signal is ignored and to only set up a new handler if isn't.

> Using nohup is like subscribing to a mailing list and then flagging the mail
> from it as spam when they are no longer wanted. The correct way is to
> unsubscribe.
> 
> To unsubscribe from SIGHUPs sent automatically, the correct mechanism is to
> create a new session using the setsid() system call, available as the setsid
> command-line tool.

  So do you think applying the patch is a good idea? Should we
check SIG_IGN for all singal handlers we try to set?

  Alexander
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20160725/80dc2584/attachment.sig>


More information about the MPlayer-dev-eng mailing list