Please create an account to participate in the Slashdot moderation system


Forgot your password?
DEAL: For $25 - Add A Second Phone Number To Your Smartphone for life! Use promo code SLASHDOT25. Also, Slashdot's Facebook page has a chat bot now. Message it for stories and more. Check out the new SourceForge HTML5 internet speed test! ×

Comment Re:Value of the open source ecosystem and communit (Score 1) 109

Well if you only care about deamons that you write your self then yes this is a no problem as you write but as a distribution one have to think about all those strange and different daemons out there.

Of course, systemd isn't a perfect solution either. For example, if a daemon forks and exits and then the child process gets stuck but doesn't terminate, systemd won't know about it. A custom restarter could check for that condition as needed.

For the random daemon out there yes but it the daemon supports systemd it can send heartbeats to systemd with "sd_notify (0, "WATCHDOG=1");" in order to catch a stalled deamon. systemd itself can also send heartbeats upwards to a harware watchdog so your whole server gets a reboot if the whole system stalls.

Comment Re:Value of the open source ecosystem and communit (Score 1) 109

pid-matching is needed in the situation where the underlying deamon forks and thus the daemon is running as a grandchild to your monitoring process. Then the only way that your process can see if the grandchild is running is to check if the pid that it stored in a pid-file is running, however due to the limited space of pids (they are only 16 bits) there can spawn a different process that gets the same pid as your grandchild between the moment the grandchild crashes and your process detects that it's down which would make your monitoring process erroneously believe that the grandchild is still running.

This all becomes moot of course if you are init since you then have complete control over grandchildren, even more so if you also are the cgroups master.

Comment Re:Value of the open source ecosystem and communit (Score 1) 109

And if it never got the SIGCHLD since signals does not have a delivery guarantee under any OS how well does your 10-line fork+execve+waitpid program work then?

And what if the daemon in question does a fork of it's own then your 10-liner gets the SIGCHLD while the daemon is running just fine and you will never get the SIGCHLD from the grandchild so you now have to add several lines more to read in a pid file and also hope that the daemon in question stores the running pid in such a file and further you have to hope that of the grandchild dies then another process that is spawned in between does not get the same pid as your grandchild. At the same time something like systemd handles all these corner cases and more due to it actually being init and not a separate process/script.

In short, the reason to implement functionality such as this into either systemd or upstart is for the distro maintainers to be able to support respawning for all different kinds of strange daemons. I get that you #1 don't want respawning to begin with and #2 only have to support a handful of such daemons but I do hope that you understand that there are others with complete different needs than yours?

Otherwise we end up with horrendous examples like the mysqld_safe script which was Oracle/SUNs try at doing this distro agnostic with sysvinit. They didn't exactly succeed to put it mildly.

Comment Re:Value of the open source ecosystem and communit (Score 1) 109

Of course you can, but you also have to write quite a bit of shell script in order to do that and not just alter a simple setting. And you would still fall through all manners of possible problems with pid-matching and so on that have plagued any such prior attempt via inittab.

Comment Re:Value of the open source ecosystem and communit (Score 1) 109

For this particular little feature of something like systemd and upstart yes, but then you have to make your solution distro agnostic, work with daemons that fork or not fork, that crashes in such a way that it brings the shell down with it and all of a sudden that small and simple program is not so small and simple any more.

Comment Re:Value of the open source ecosystem and communit (Score 1) 109

However handing respawning via inittab is like wielding a sledgehammer in a glass shop. With systemd you can enable/disable this with a easy setting on a per daemon basis and also define "only respawn X number of times during Y number of seconds" among other things.

Regarding your second opinion I tend to agree, however there exists plenty of daemons/services where a pure restart does no real harm (say a webserver, dns server and so on) and one does not exclude the other, i.e just because your daemons respawn automatically does not mean that you also dos not look into why they did.

Comment Re:Microsoft, can you fix Linux? (Score 0) 159

If you think that journald resembles the Event Viewer design then you have not used or developer for either one. Just because journald happens to use a binary storage format does not make it anywhere like the mess that is Event Viewer. EW is designed to handle 1-2 logs per minute with a huge dose of NIH syndrome regarding GNU gettext.

Comment Re:Uhm sounds like Sweden (Score 1) 181

Well to be honest this only happened in Stockholm and was not called Feminist Snow Plowing but Equal Snow Plowing in which walking- and bike-lanes as well as roads used by the public transport where prioritized over car roads. And the blog that you link to is kind of fake news because the snow chaos that happened in Stockholm was not due to this new prioritizing but that there came more snow than anticipated so the people in charge of the plowing where slow to start.

Slashdot Top Deals

Elliptic paraboloids for sale.