I was looking through the process table and this process, /bin/sleep infinity, was there. It's started by /lib/systemd/systemd --user.

If I kill the sleep, my current session is stopped and I get booted off the system.

What is this supposed to be doing?

  • How did you log on to this session? sleep is a common practice to keep containerized applications running; are you working in a container environment? – berndbausch Apr 7 at 7:46
  • I doubt it was "started by /lib/systemd/systemd --user". That process is probably the "reaper" process for your systemd user session, so any process in that session whose parent dies becomes a child of it. – muru Apr 7 at 7:53
  • No the ppid is systemd --user. How is sleep meant to keep containerized applications running? Or do you mean it is meant as a keep-alive mechanism for a containerized process? Be that as it may, kill the sleep process kills the X session, which is a little strange. – placid chat Apr 7 at 8:15
  • @placidchat ppid being systemd --user doesn't mean that process created it. – muru Apr 7 at 9:02
  • yes you are right. But why is this sleep process started though. It is </usr/bin/sleep infinity>. If anyone is using systemd, this should also appear. – placid chat Apr 7 at 9:12

I had a quick grep through /usr/lib/systemd/user and it turns out there's a service called session-monitor.service with an execstart of /bin/sleep infinity. In the description it says that this:

Stops autojack which starts Studio audio in the same way the session ended as well as providing a back end for studio-controls for changing various settings.

which seems strange since sleep doesn't do anything except sleep. The execStopPost of session-monitor.service is ExecStopPost=/bin/systemctl --user start systemd-exit.service, which explains why killing this process gets the user kicked off the system.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.