Re: [PATCH 2/5] daemon: if one of the standard fds is missing open it to /dev/null

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Matthias,

(Do you know you set the Mail-Followup-To Header?  That is annoying.)

>     devnull = open("/dev/null", O_RDWR, 0);
>     while (devnull != -1 && devnull < 2)
>         dup(devnull);
You mean

	  devnull = dup(devnull);

, don't you?

>     if (devnull == -1)
>         die("..");
>     close(devnull);

Best regards
Uwe

-- 
Uwe Zeisberger

primes where sieve (p:xs) = [ x | x<-xs, x `rem` p /= 0 ]; \
primes = map head (iterate sieve [2..])
-
: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]