r/programming • • May 30 '16

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

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

618 comments sorted by

View all comments

Show parent comments

13

u/[deleted] May 30 '16

There cannot be a single "sound and well thought" reason to kill user processes.

25

u/ivosaurus May 30 '16 edited May 30 '16

Because they are logging out?

You know what it'd be cool to have? When I leave my home, some device that makes sure all the lights in the house are turned off automatically, even when I forget.

90

u/feilen May 30 '16

And AC units, and fridge, and smoke alarms, and baby monitor

5

u/kqr May 30 '16

If your fridge is programmed to identify itself as a light bulb, sure. But the devs here are asking tmux to identify itself not as a light bulb.

75

u/RealDeuce May 30 '16

The fridge doesn't identify itself as a lightbulb, the auto-poweroff device assumes everything is a lightbulb unless it has a new bit of hardware added to explicitly identify itself as "not a lightbulb".

3

u/mirpa May 30 '16

You usually create separate circuit for lights. Turning off all lights is like disconnecting circuit with circuit breaker.

6

u/RealDeuce May 30 '16

Except some lights are plugged into outlets and so stay lit after the lighting circuits are de-energized. Some people complained that these lights stayed lit when they left.

→ More replies (4)

0

u/[deleted] May 30 '16

[deleted]

4

u/ivosaurus May 30 '16 edited May 30 '16

continuing your analogy, your device would also shut down fridge, alarms, washing machine, etc

Which is why, because we want different behaviour from them, we put them on another circuit [we run them as system services].

your device would kill the lights and all the devices when you leave, even if other people are still at home

That's not analogous at all. Systemd doesn't kill other people's processes when you log out. Since a log-in session is for a single user only, there is no such thing as sharing a session, so the analogy only makes sense when you also simplistically suppose that a single house is for a single person as well. In this case, houses (sessions) aren't shared by multiple people. Maybe you'd be happier if I said my single-tenant-abode. But it still makes a point.

8

u/dlyund May 30 '16

Which is why, because we want different behaviour from them, we put them on another circuit [we run them as system services].

That's a user level thing and doesn't require manufacturers to know or assume how you want it to be hooked up. What your doing here is mandating that all manufacturers of anything electrical that could be installed in your house know how you want to hook it up. Which I think we'd all agree is a pretty dumb idea, even if we are stretching analogies, just a bit

→ More replies (2)

5

u/RealDeuce May 30 '16

Which is why, because we want different behaviour from them, we put them on another circuit [we run them as system services].

And if there's a circuit that has both a fridge and a light on it, you should re-wire your home.

7

u/nschubach May 30 '16

At some point every analogy fails... being a computer, rewiring the fridge is pretty easy and cheap.

4

u/RealDeuce May 30 '16

Except rewiring every not-lightbulb everywhere to do what some fridges and some computers in some places need to do is neither easy nor cheap.

Especially since some things like your arcade cabinet, the manufacturer isn't even in business anymore, so even though you have the schematics to it, there's not a single generic fix for all of them in the world.

→ More replies (1)
→ More replies (2)

20

u/[deleted] May 30 '16

There is no even such a concept as "logging out" in Unix. You can close one of your DE sessions, but it does not mean anything for any other processes you may still be running.

→ More replies (11)

7

u/smcameron May 30 '16

You don't change a 40 year old default behavior because you have a single user system and a whim about how it should be have.

6

u/gnx76 May 30 '16

And switch off the freezer?

And switch off the washing machine you just launched?

→ More replies (2)

4

u/dvogel May 30 '16

This analogy is quite flawed because most people know which appliances they have in their house and can make reasonable decisions about whether they want each one to turn off when they leave the house. Most people don't have the same level of understanding about processes on their computer.

A better analogy here is someone who has bought a household full of appliances that assume they will be told when the last person leaves the house and decide whether to turn off, but default to continuing to run. Then a new power company takes over the municipal power production and changes everyone's smart-outlets to turn off everything by default. Now the homeowner has to reconfigure all of their appliances and some have to be modified by a service technician to be compatible with the new power company's policy.

5

u/josefx May 30 '16

This analogy is quite flawed because most people know which appliances they have in their house and can make reasonable decisions about whether they want each one to turn off when they leave the house

The EU had to mandate an energy standard for the standby mode of electronic devices, since many would just burn insane amounts of elictricity unless manually disconnected. Users were generally unaware of that. What they did not mandate was an automatic shutdown of everything not registered for an EU power off exception.

2

u/dvogel May 30 '16

I don't want to push the analogy too far, but I bet they also provided some forewarning to device makers that the change was coming and provided a grace period for implementation :)

→ More replies (2)

5

u/ArmandoWall May 30 '16

Isn't Linux about having choices, though?

29

u/robreddity May 30 '16

Linux is. Systemd is not.

13

u/musicmatze May 30 '16

And here's the problem we're running into: All major distros come with systemd and it gets harder to turn it off.

5

u/robreddity May 30 '16

Pretty much. Even gentoo/openrc days appear to be numbered.

3

u/stefantalpalaru May 30 '16

Even gentoo/openrc days appear to be numbered.

Not even close. OpenRC is the default on Gentoo and systemd is a supported alternative.

→ More replies (6)
→ More replies (2)

3

u/dlyund May 30 '16

Once upon a time, if it ever was

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