Web lists-archives.com

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




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

Attachment: signature.asc
Description: PGP signature

_______________________________________________
MPlayer-dev-eng mailing list
MPlayer-dev-eng@xxxxxxxxxxxx
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng