daemonize icon indicating copy to clipboard operation
daemonize copied to clipboard

Library for writing system daemons

Results 11 daemonize issues
Sort by recently updated
recently updated
newest added

Without the waitpid() it is possible that the setsid() has not completed yet when the main process terminates, potentially causing a race condition: If setsid() has not completed and the...

Hey there, curious to know if you were planning a 0.5 release to crates.io. I did see some discussion in #44 on the topic. I'm opening a new issue to...

if i run in tokio::spawn and println anything in asynchronous programming, it can't println stdout or stderr in my file

Add line separator to pid file since systemd shows the warning log: ``` Failed to parse PID from file foo.pid: Invalid argument ```

# Problem We have a non-root program using a hybrid system for daemonisation, it must use the PID files created by Daemonize. The files need to be `chown`ed to the...

As described in section 8.1 of https://people.eecs.berkeley.edu/~daw/papers/setuid-usenix02.pdf, setuid should be avoided because of its inconsistent implementation across different unix systems. Instead, setreuid should be used, as it is more consistent...

1. The `child_ret` returned by current `waitpid` is the status information of the child process, NOT the exit code. https://github.com/knsd/daemonize/blob/8a87c0b9e5568d2d57284d68e18ea5f24dcad5fb/daemonize/src/lib.rs#L443-L447 We can get the exit code with `libc::WEXITSTATUS`. 2. I...

Hi and thank you so much for making this amazingly useful crate. The error mod seems incredibly useful to treat errors differently, but unless I'm missing something (and that's not...

Fixes UB in `Daemonize::privileged_action` by removing the transmute from `Daemonize` to `Daemonize`. Transmuting between `Daemonize` and `Daemonize` is not guaranteed to be valid, as the transmute may temporarily put `self.privileged_action`...