4 ms·
Several years ago I was developing a "robust serial console over USB" feature for Linux. THis feature allows you to have a console on, say /dev/ttyUSB0. The de
by kazinator 11y ago
Several years ago I was developing a "robust serial console over USB" feature for Linux. THis feature allows you to have a console on, say /dev/ttyUSB0. The device doesn't have to be plugged in. When you plug in the USB-Serial dongle, you have a console. You can unplug your serial dongle right in the middle of a session, plug in one that uses a different chip, and your session is intact! Just "Ctrl-L" to refresh your Vim window where you were editing and there you are. The /dev/ttyUSB0 did actually disappear when unplugged and did re-appear on the re-insertion, but the TTY session was isolated from that, held in a suspended state.
Chopping apart the USB-Serial and TTY code in the kernel was relatively a piece of cake; but systemd threw up a wall, ironically! I got good help from the mailing list:
https://lists.freedesktop.org/archives/systemd-devel/2013-May/011011.html https://lists.freedesktop.org/archives/systemd-devel/2013-Ma...
At first I was stumped: everything should work, but what the heck is killing my login sessions when I unplug the device? I went over the code to make absolutely sure nothing would be getting a hangup signal from the TTY or the like. Through kernel printk messages, I traced it to systemd, slapping my forehead. Basically, even though the tty session was being kept intact, it was the fact that the USB device went away that systemd killed the session.
Once I solved the systemd issues, everything worked great.
systemd: it just likes to kill things, at least in its default configuration.
- 0x0 11y agoI can't believe the attitude you received in some of those replies :-/
- uuoc 11y agoActually, that attitude is exactly what one receives from the systemd crew. They, and only they, know what you want, when you want it, and they always know better than you do. That's why the systemd crew generates such great hatred.
- misnome 11y agoI love that the long, flaming reply so obviously didn't read the entire report, went on to lecture how to change the behaviour, and completely ignored the questions of expectation.
- JdeBP 11y agoI suspect that you're all talking about the reply from Christian Rebischke, who is indeed now talking about a "hate-report" and "a reason to cry". * https://twitter.com/Sh1bumi/status/735973258793779200 https://twitter.com/Sh1bumi/status/735973258793779200 In fairness, please note that Christian Rebischke is not one of the Debian system maintainers, who wrote some of the other replies and whom you will find listed on this Debian WWW page: * https://packages.qa.debian.org/s/systemd.html https://packages.qa.debian.org/s/systemd.html Nor is xe a systemd developer, apparently. * https://github.com/systemd/systemd/commits/master?author=shibumi https://github.com/systemd/systemd/commits/master?author=shi... Unless filing bug reports against systemd makes xem part of "the systemd crew", which, considering the headline of this page, would be a huge double standard. * https://github.com/systemd/systemd/issues?q=shibumi https://github.com/systemd/systemd/issues?q=shibumi
- mgbmtl 11y agoI read the thread, and it seemed rather cordial. Which message in particular?
- digi_owl 10y agoThe one from GregKH, natch. The one that the linked to email is a reply to.
- mgbmtl 10y agoAh oops indeed. Skimmed too quickly :) The replies from other people (A. Borzenkov) seemed OK.
- digi_owl 10y agoYeah i am sitting here confused about why Greg got involved at all, especially in such a rough manner. But then he seems to straddle the kernel/userspace line more than most other kernel devs i know of.
- deleted 11y ago[deleted]