Instead of closing the standard file descriptors, dup2 them to /dev/null.
Also, Put a forever loop in main() to keep this baby running until it's killed.