rapiddisk
rapiddisk copied to clipboard
fix(daemon leaks): rework main loop and fork() approach
fix(daemon leaks): rework main loop and fork() approach
Make the daemon fork() twice, remove the thread and use signals to clean-exit.
Why fork() twice: http://www.faqs.org/faqs/unix-faq/programmer/faq/ at 1.7
.
Redirect STD* to /dev/null in daemon mode.
Added the -d
switch to avoid forking and printing messages to STDERR.
Let me know what you think @pkoutoupis !
Next step is to output JSON without invoking rapiddisk
.
Regards
Since both this and the other PRs are fairly large, I would like to schedule a Zoom call (if you do not mind) to step through them. Can you please reach out at petros AT petroskoutoupis DOT com?
Since both this and the other PRs are fairly large, I would like to schedule a Zoom call (if you do not mind) to step through them. Can you please reach out at petros AT petroskoutoupis DOT com?
I'll write you ASAP!
Regards
This PR is superseeded by #139, can be closed.
Regards
Per the request.