#465348 alpine: pine kills any application it opens when pine closes

Package:
alpine
Source:
alpine
Description:
Text-based email client, friendly for novices but powerful
Submitter:
Tim Connors
Date:
2010-12-23 13:03:03 UTC
Severity:
normal
#465348#5
Date:
2008-02-12 00:50:16 UTC
From:
To:
When opening any application using the appropriate mimetype handler on
an attachment in a message, quitting pine kills the application as
well.  This is both unnecessary, and rather un-unixy (some would say
rude)!

Alas, there does not appear to be a config item for this.

#465348#10
Date:
2010-12-23 13:01:52 UTC
From:
To:
Actually, it's not pine per se that's killing the children, but the fact
that they're in the same session with pine as the session leader.

If I just fire up pine in a pre-existing xterm then get it to open up an
attachment, then close pine, the viewing program remains open.

If I run 'xterm -e pine', then all the processes have pine (or 'sh -c
pine', actually) as the sessionleader, so both xterm and the kernel come
along and send SIGHUPS to all the children including the MIME viewer when
the tty is closed.

The viewer is already forked off in a 'sh -c' process that runs the
process in the background and removes the temporary file after the process
exits.  If after the fork, before execing 'sh -c', pine called setpgrp, I
imagine this problem would go away.  Since the viewer is not likely using
the tty (say, it's xpdf displaying a GUI), then sending it a SIGHUP is
non-sensical, and so it makes sense to put it as its own session leader.