This crate exists, but if you want the output to appear on standard out, you'll have to do something like opening /dev/stdout as a file (as it redirects to /dev/null by default, and the only override is to pass in a File).
Incidentally, when you run a daemon or run a background process, you're returned to whatever shell you were already running.
Although I feel like I'm missing something obvious.
It writes the pid to a file, but do you have any idea how to find what the pid is from the parent program?
I could obviously read the file but that would seem like a waste. It seems the start method should return a pid, or the structure would have a method that would return the pid.