/srv/irclogs.ubuntu.com/2017/08/24/#upstart.txt

scottmmjacksonI'm having a curious issue on Ubuntu 14.04 using upstart to spawn a service that subsequently spawns child processes using `su`. Specifically on Ubuntu 14.04, for some reason, `systemd-logind` is sending SIGHUP to any spawned child. Aside from being confused by seeing `systemd-logind` on the default ubuntu14 box where `init` is `upstart`, I'm also a bit baffled by why systemd-logind is sniping my 15:16
scottmmjacksonservice's children with HUP.15:17
scottmmjacksonI've regressed this on Ubuntu 12 and the bug isn't there, which just raises further questions.15:18
xnoxsystemd-logind is normal, as we have moved to that from consolekit16:06
xnoxscottmmjackson, why are you using su, instead of using setgid/setuid stanzas? http://upstart.ubuntu.com/cookbook/#setgid16:08
xnoxsystemd-logind in this case is just the daemon for session management / reconcilation16:08
scottmmjacksonxnox: su isn't being used in the exec stanza. the parent process is exec'd directly. Its child processes are being forked and calling pam_open_session.16:24
scottmmjacksonThe service of which is `su`16:24
scottmmjacksonsorry for the confusion16:24
scottmmjacksonIronically, however, if the exec line is written like the session-init.conf as listed in this part of the cookbook, forking works just fine: http://upstart.ubuntu.com/cookbook/#non-graphical-sessions-ubuntu-specific16:26
scottmmjacksonWhich uses su directly.16:26
scottmmjacksonSo there's a fix- wrap it in `/bin/su` like the cookbook says. But I don't feel great not grokking what conditions cause `systemd-logind` to behave this way.16:28

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!