Hi I don't think this is something the application should need to configure, you should be able to configure it in systemd (and it sounds like you can from what you say).
On Wed, May 25, 2011 at 04:58:46PM +0200, Christian Hesse wrote: > Nicholas Marriott <nicholas.marri...@gmail.com> on Mon, 23 May 2011 > 20:18:21 +0100: > > I'm not convinced tmux should need PAM support to do something > > perfectly normal. > > > > How does systemd deal with other programs that want to daemonize? > > Surely it doesn't kill eg httpd if you start it from a terminal. > > Surely it does! ;) > > "Mark T. Kennedy" <mkenn...@diamondbackcap.com> on Tue, 24 May 2011 > 08:00:51 -0400: > > hmm... that doesn't happen to me on an FC15 instance running > > systemd. i.e. > > > > ssh fc15-box 'tmux attach || tmux new-session' > > > > followed by detaching, followed by a 2nd invocation of the > > same command, puts me back in the original session. > > Ok, let's be a bit more specific. > > Case A: > You do not have set up anything in /etc/pam.d/ for systemd. Services > started by systemd get their own cgroup > (name=systemd:/system/{httpd,sshd,slim}.service), processes started by > these parents get the same cgroup. > So if you ssh to a box, start tmux, detach, log out and restart sshd > the tmux session is kill as well. The same is true for a tmux session > launched anywhere under X when you restart the login manager. > > Case B: > You have set up pam_systemd.so without any options. Interactive > sessions get their own cgroup, systemd does not care left over > processes if the user logs out. > tmux should work without any problems in this case, but there is no > garbage collection. > > Case C: > You have set up pam_systemd.so with with kill-user=1, kill-session=1 or > similar options. Processes in the same cgroup are killed as soon as the > user logs out. This kills daemons like gpg-agent, etc. and even httpd > when started from a terminal. > > From man pam_systemd: > > Note that setting kill-user=1 or even kill-session=1 will break > > tools like screen(1). > > Pam support for tmux could create it's own cgroup via pam_systemd. This > way tmux could not be broken by systemd. > -- > Schoene Gruesse > Chris ------------------------------------------------------------------------------ vRanger cuts backup time in half-while increasing security. With the market-leading solution for virtual backup and recovery, you get blazing-fast, flexible, and affordable data protection. Download your free trial now. http://p.sf.net/sfu/quest-d2dcopy1 _______________________________________________ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users