[sheepdog] [PATCH] logger: avoid using SIGHUP for detecting death of sheep

MORITA Kazutaka morita.kazutaka at gmail.com
Mon Jan 20 08:45:05 CET 2014


At Tue, 14 Jan 2014 17:46:26 +0900,
Hitoshi Mitake wrote:
> 
> @@ -620,6 +607,15 @@ static void logger(char *log_dir, char *outfile)
>  
>  		unblock_sighup();
>  
> +		if (getppid() == 1) {
> +			/* My parent (sheep process) is dead. */
> +			log_flush();
> +			closelog();
> +			free_logarea();
> +
> +			exit(1);

Breaking this loop is simpler.  Otherwise, this patch looks good to
me.

Thanks,

Kazutaka



More information about the sheepdog mailing list