if(!(pid = xfork())) {
/* grandchild */
exitfn = _exit;
/* log errors and output somewhere reasonably sane. rtp_running()
* will have made sure the directory exists. */
if((fd = open(rtp_log, O_WRONLY|O_CREAT|O_TRUNC, 0600)) < 0)
if(!(pid = xfork())) {
/* grandchild */
exitfn = _exit;
/* log errors and output somewhere reasonably sane. rtp_running()
* will have made sure the directory exists. */
if((fd = open(rtp_log, O_WRONLY|O_CREAT|O_TRUNC, 0600)) < 0)
/* We don't want to hang onto whatever stdin was */
if((fd = open("/dev/null", O_RDONLY)) < 0)
/* We don't want to hang onto whatever stdin was */
if((fd = open("/dev/null", O_RDONLY)) < 0)
/* execute the player */
execlp("disorder-playrtp",
"disorder-playrtp", "--socket", rtp_socket, (char *)0);
/* execute the player */
execlp("disorder-playrtp",
"disorder-playrtp", "--socket", rtp_socket, (char *)0);