X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Ftincd.c;h=15a5622d814ac13a8a121252ccac172637153034;hb=34ea20af73a35cd918ce9dc25796bebf9493b49c;hp=b62c8c1903a7cf30002b2a1a0ba57efd1f9ce2fa;hpb=11868b890d1a7f4cfbfb37099393b32019010f66;p=tinc diff --git a/src/tincd.c b/src/tincd.c index b62c8c19..15a5622d 100644 --- a/src/tincd.c +++ b/src/tincd.c @@ -43,8 +43,6 @@ #include #endif -#include - #include "conf.h" #include "control.h" #include "crypto.h" @@ -344,7 +342,7 @@ int main(int argc, char **argv) { if(show_version) { printf("%s version %s (built %s %s, protocol %d.%d)\n", PACKAGE, BUILD_VERSION, BUILD_DATE, BUILD_TIME, PROT_MAJOR, PROT_MINOR); - printf("Copyright (C) 1998-2014 Ivo Timmermans, Guus Sliepen and others.\n" + printf("Copyright (C) 1998-2015 Ivo Timmermans, Guus Sliepen and others.\n" "See the AUTHORS file for a complete list.\n\n" "tinc comes with ABSOLUTELY NO WARRANTY. This is free software,\n" "and you are welcome to redistribute it under certain conditions;\n" @@ -370,6 +368,10 @@ int main(int argc, char **argv) { umbilical = atoi(umbstr); if(fcntl(umbilical, F_GETFL) < 0) umbilical = 0; +#ifdef FD_CLOEXEC + if(umbilical) + fcntl(umbilical, F_SETFD, FD_CLOEXEC); +#endif } #endif