Re: [PATCH] Support for nohup in mplayer

Alexander Strasser <[email protected]>
Newsgroups gmane.comp.video.mplayer.devel
Message-ID <[email protected]>
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

_______________________________________________
MPlayer-dev-eng mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
signature.asc (application/pgp-signature, 181 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iEYEARECAAYFAleWipEACgkQp9ile6h25Y/r9ACgh481wOMs0kM6sCTMdKKZxJfe
G+IAnRRwtrU1crZrQFCc4Bmvb0gu8nmc
=wCe3
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.