RE: The daemonize/pty issue

From: Murray S. Kucherawy <msk_at_cloudmark.com>
Date: Thu, 21 Apr 2011 16:04:14 -0700

> -----Original Message-----
> From: opendkim-users-bounce_at_lists.opendkim.org [mailto:opendkim-users-bounce_at_lists.opendkim.org] On Behalf Of Sam Umbach
> Sent: Thursday, April 21, 2011 3:28 PM
> To: Murray S. Kucherawy
> Cc: Clint Byrum; opendkim-users
> Subject: Re: The daemonize/pty issue
>
> I'll confirm, but my initial tests with nohup were unsuccessful.
> Additionally, using nohup on the daemon start will report immediate
> success even if the daemon fails to start.

If all it's doing is ignoring SIGHUP, this doesn't make any sense. Failure to start the daemon should still cause the parent to return an error status, or log or print something, or some or all of those, and then exit, just as if it were run directly from an interactive shell.

The source I have for nohup from FreeBSD shows it doing little other than setting SIGHUP to be ignored and then calling execvp() on the thing to be run with SIGHUP protection. It doesn't call setsid() or any of that, and if SIGHUP is indeed the culprit, it shouldn't need to do anything else.
Received on Thu Apr 21 2011 - 23:04:27 PST

This archive was generated by hypermail 2.3.0 : Mon Oct 29 2012 - 23:20:17 PST