Hi On Mon, May 12, 2014 at 1:49 PM, Sergei Kabanov <s.kabano...@mail.ru> wrote: > Hello > But all children will have that descriptor open. So when parent process will > die logind will not be notified.
And? That's intentional. If you want to close the session if the main process dies, use something like /bin/login does: call pam_close_session() on SIGCHLD. Note that if we set O_CLOEXEC, then the exec() after the pam-dance will immediately close the FIFO, thus also close the session. So we cannot set O_CLOEXEC. So please call pam_close_session() to notify systemd about session-deaths, or use something like this: for i in /proc/self/fd/* ; do close($i); done to close all file-descriptors before you exec(). But this is really just a nasty hack. Thanks David _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel