r/linux • • May 28 '16

systemd developer asks tmux (and other programs) to add systemd specific code

https://github.com/tmux/tmux/issues/428
359 Upvotes

509 comments sorted by

View all comments

26

u/qwesx May 28 '16

The suggestion was to make it "compile time and run time optional". What exactly is the problem with that?

34

u/sub200ms May 28 '16

The suggestion was to make it "compile time and run time optional". What exactly is the problem with that?

The problem isn't technical, but rather a social one: tmux is (Open)BSD's answer to GNU Screen. AFAIK, tmux is developed on OpenBSD and then ported to Linux.

screen is GPL licensed so it can't be close sourced, and therefore can't be included in base BSD.

So its affinity to BSD means that key developers probably dislike systemd and all similar GPL programs.

14

u/[deleted] May 29 '16

This is not entirely accurate. GPL software has been included with the BSDs in the past, namely GCC.

3

u/sub200ms May 29 '16

This is not entirely accurate. GPL software has been included with the BSDs in the past, namely GCC.

Yes, sometimes they are forced to use GPL software until they have made a substitute so they can kill off the GPL software. Here is a GPL list tracking GPL software FreeBSD wants to kill off in base:

https://wiki.freebsd.org/GPLinBase

BSD are generally sponsored by companies wanting to close source the distro. That is why they constantly are attacking the GPL license; it prevents easy profiteering by close sourcing "Open Source Software".

→ More replies (1)

33

u/Muvlon May 29 '16

OpenBSD folks have all the reason to dislike systemd regardless of its license. systemd is the reason why a lot of formerly POSIX-compliant (and therefore BSD-compatible) software is now Linux-exclusive.

12

u/Olosta_ May 29 '16

Such as ?

2

u/zakk May 29 '16 edited Aug 26 '18

.

3

u/KugelKurt May 30 '16

Actually it's the OpenBSD guys that write systembsd to provide systemd APIs under OpenBSD.

→ More replies (3)
→ More replies (5)

42

u/luke-jr May 28 '16

Software shouldn't need platform-specific code for common tasks that have worked fine for decades.

40

u/ratatask May 28 '16

Yet tmux contains quite a handful of ifdefs for system specific stuff, and 2900 lines of code to smooth over various differences between systems.

12

u/luke-jr May 28 '16

Not for the simple common task of becoming a background daemon.

→ More replies (2)
→ More replies (5)
→ More replies (7)

36

u/lolidaisuki May 28 '16

What exactly is the problem with that?

The fact that there is no need for it at all? It's extra code on possibly hundreds of projects just so that one project (Gnome) doesn't have to fix their bugs.

9

u/[deleted] May 28 '16

It's extra code on possibly hundreds of projects just so that one project (Gnome) doesn't have to fix their bugs.

What does this have to do with Gnome? Plenty of applications wouldn't get cleaned up properly when logging out if that is what you are referring to.

33

u/[deleted] May 28 '16

lol, that's literally a gnome bug

21

u/lolidaisuki May 28 '16

Plenty of applications wouldn't get cleaned up properly when logging out if that is what you are referring to.

But most applications won't break because of it. The fact that Gnome does is problem with Gnome, nt every other package ever.

13

u/[deleted] May 28 '16

At the point where random processes are left running when a user logs out I'd call that 'undefined behavior' so sure sometimes that does or doesn't cause problems but it is a real issue IMO.

9

u/Lennartwareparty May 28 '16

It's not undefined, it's completely defined what the semantics are and what happens.

24

u/redrumsir May 28 '16

And if it was unintended to have those processes not terminate on logout ... then one should fix that issue, rather than changing a long-time default behavior. Fix the bugs where they are, don't have a blanket fix of the symptoms.

Why? If it isn't obvious:

  1. It will still be a bug on non-systemd systems.
  2. It will still be a bug on systemd systems that set up systemd to have KillUserProcesses=No. Which, if I used systemd is what I would do. I often create jobs that run 24/7 for a week or more.

3

u/[deleted] May 28 '16

I can certainly agree that if there is a specific application having this issue they should fix it on all platforms but I don't think that this change is inherently bad moving forward though.

12

u/redrumsir May 28 '16

You are OK with breaking the behavior of daemon (http://linux.die.net/man/3/daemon ) or do you think that daemon needs to have systemd-specific code to keep its specified behavior.

6

u/[deleted] May 29 '16 edited May 29 '16

If you go purely off of the description there:

The daemon() function is for programs wishing to detach themselves from the controlling terminal and run in the background as system daemons.

Then I think in order to be a "system daemon" in this case would require interfacing with systemd since it manages your systems daemons.

As a user though I prefer more explicit behavior so users know what will and will not run beyond their users session. I admit I do not know what the ramifications of amending that description to be "user daemon" on systemd would be though since most services should be configured properly already.

→ More replies (1)
→ More replies (6)

6

u/lolidaisuki May 28 '16

You'd call it undefined, but it's often intentional. People leave processes running on the background on purpose.

10

u/[deleted] May 28 '16

And users can still explicitly do this.

20

u/redrumsir May 28 '16

And when they do this by setting KillUserProcess=No ... then those GNOME processes that should have terminated/cleaned themselves will still be a bug. Fix the problem, not the symptom.

→ More replies (4)
→ More replies (20)
→ More replies (30)

6

u/_samux_ May 29 '16

because the problem comes from systemd, that decided to change an expected behavior of linux.

Also, while this could - kind of - make sense on a desktop system, this behavior on a server, is horribly wrong in so many ways I don't know where to start.

→ More replies (2)
→ More replies (3)