Hacker News new | past | comments | ask | show | jobs | submit login

Why would it not work correctly?

Without systemd you can use daemonize from shell, for example. I either run these kinds of service scripts via systemd in production, or via my special program that takes care of starting and monitoring, and restarting when the code of the script changes.

Why should I stuff daemonization machinery into every single script I might want to run as a daemon, especially when it's cumbersome in many languages where I want to do it, like bash or PHP, and in general less flexible than using some external tool?




maybe you're right. shrug. does your script change the working directory? do all systems have fancy core file management now? does it still cause issues with unmounting?

it is true that it's rare to see a daemonize flag these days...


This all depends on what the program does. If you have some app specific service that waits for postgresql NOTIFY messages, and does something in response, it doesn't matter that working dir is not /. You just stop the service and perform maintenance.

If it's something like sshd, it better not prevent any filesystems from umounting unless necessary.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: