Branch: Tag:

2013-05-31

2013-05-31 13:39:53 by Andreas Petersson <andreas@sbin.se>

Add some error-handling in Process.daemon, fix documentation in System.daemon.

1100:   #endif   #endif    - private void low_daemon(int nochdir, int noclose) + private int low_daemon(int nochdir, int noclose)   {   #if System.daemon    return System.daemon(nochdir, noclose);
1124:    if (fd->query_fd() > 2)    fd->close();    } +  return 0;   #endif /* !System.daemon */   }   
1183:    opened += ({ ret });    return ret;    } -  else +  else if (objectp(f))    return f; -  +  else +  return 0;    };    -  low_daemon(nochdir, noclose); -  if (undefinedp(modifiers)) +  if (low_daemon(nochdir, noclose) == -1) +  error("Failed to daemonize: " + strerror(errno())+"\n"); +  if (!modifiers)    return;       if (modifiers["cwd"])