systemd cat and GNU cat hugging a Linux cat.

  • mittorn@masturbated.one
    link
    fedilink
    arrow-up
    1
    arrow-down
    9
    ·
    7 days ago

    @furycd001 @nutbutter Technically, it’s broken. If you run screen/tmux built without systemd support, it will be killed on logout. Systemd requires every program that needs daemonize link libsystemd0 only to notify systemd to keep it running. So it’s broken, but worked-around in every software which need daemonize

    • twice_hatch@midwest.social
      link
      fedilink
      English
      arrow-up
      11
      ·
      edit-2
      6 days ago

      Systemd requires every program that needs daemonize link libsystemd0

      No, that’s only if you want the health check feature, so that systemd can distinguish between e.g. “The process is started” and “The HTTP server is bound and listening”

      You can run hello world and a sleep() loop as a systemd daemon. You can run a Bash script as a systemd daemon.

      I’m pretty sure that notification is also like 5 lines of code. You read an env var and that tells you a pipe to send a single character on.

      You are not obligated to use libsystemd. And if you were you could certainly layer another init system inside of it

    • Lka1988@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      10
      arrow-down
      2
      ·
      7 days ago

      So, running a program incompatible with a particular system leads to incompatibilities?

      Wow, who’d have thought…

      • mittorn@masturbated.one
        link
        fedilink
        arrow-up
        0
        arrow-down
        1
        ·
        6 days ago

        @lka1988 why systemd needs some extra compatibility? If it designed to work, it must just work, not requiring changing evertyhing around

        • Lka1988@lemmy.dbzer0.com
          link
          fedilink
          English
          arrow-up
          2
          ·
          6 days ago

          Ok, let me spell this out for you:

          IF YOU RUN A PROGRAM THAT IS INCOMPATIBLE WITH A CERTAIN PART OF THE CORE SYSTEM, DON’T BE SURPRISED WHEN IT LEADS TO INCOMPATIBILITIES.

    • InnerScientist@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      6 days ago

      If you run screen/tmux built without systemd support, it will be killed on logout.

      Actually, if you run anything and logout, it will be killed after a timeout. The way to prevent this in systemd land is to enable-linger for that user.

      IMO this is a pretty sane default and it’s easy enough to disable for users

      EDIT: For non-root users

      • mittorn@masturbated.one
        link
        fedilink
        arrow-up
        1
        ·
        6 days ago

        @InnerScientist This might be good behaviour (especially on shared multiuser system)
        But how often you using shared multiuser systems in 2025? In 2015? In 2010 this might be useful, but now we are using containers instead.
        When you have single root user, single unpriveleged user and few service users, such behaviour is just useless. If interactive user left some services running, it’s usually intentional. And systemd requires notify about this intention every time. Why? It’s just useless complexity.

        • InnerScientist@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          edit-2
          5 days ago

          And systemd requires notify about this intention every time.

          Systemd requires a one time fee of loginctl enable-linger myserviceuser to never kill processes with a timeout for that user again. This behavior also doesn’t affect system users, only normal users.

          I think the main purpose nowadays is to stop pipewire and other user services that don’t need to consume resources when that user isn’t logged in