Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Rainer Weikusat Newsgroups: comp.unix.programmer Subject: Re: Faking a TTY on a pipe/socketpair Date: Tue, 10 Dec 2024 22:02:25 +0000 Lines: 26 Message-ID: <87r06fjixa.fsf@doppelsaurus.mobileactivedefense.com> References: Mime-Version: 1.0 Content-Type: text/plain X-Trace: individual.net avRZDfq1R7MlfO1leBxf8AjvXYsCWNub8UMZJTmC2IoDNb1tc= Cancel-Lock: sha1:M95bxM41AGbIBa3eLWmOHpi8Ymg= sha1:PluaJRbcGpOoyxKu+h8lmefreE8= sha256:YpEqBypesH5xkAKYo/A9bxRZip2B/JiQYtIAT/5s6vE= User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) Xref: csiph.com comp.unix.programmer:16697 Lawrence D'Oliveiro writes: > On Tue, 10 Dec 2024 09:23:13 -0000 (UTC), Muttley wrote: > >> But the core part should really just be limited to starting the >> machine and getting enough things running for a user to log on (or >> if its a black box to do its task). > > One thing lacking from sysvinit is, while it can start a service, it > cannot ensure the service was started properly, and it cannot perform > reliable service shutdown. So the job of service management was really > only half-done. sysvinit has no concept of 'service.' "Service started properly" is a pointless historical property because "service was running propery 1ms" ago doesn't mean "service is still running properly now" (that's one of the classic TOCTOU races everybody just loves to ignore). It's unclear what "reliable service shutdown" is supposed to mean. It's possible to stop a somehow monitored process (not service) reliably (or sort-of reliably) by killing it if it didn't terminate on its own within some amount of time after a SIGTERM was sent to it. This works perfectly with a special-purpose tool for that and doesn't need any giant wolpertingers implemented with hundredthousands of lines of overcomplicated C code.