From a4747f279e2a79a288d9265cf1b8c1de127114b7 Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Sat, 28 Jan 2012 19:16:45 +0100 Subject: [PATCH] Changed _SQUID_MSWIN_ to _SQUID_WINDOWS_ everywhere.\ngetppid() is not available on windows; disable KILL_PARENT_OPT --- src/main.cc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/main.cc b/src/main.cc index b161c50dec..d982530f05 100644 --- a/src/main.cc +++ b/src/main.cc @@ -171,7 +171,7 @@ static void SquidShutdown(void); static void mainSetCwd(void); static int checkRunningPid(void); -#if !_SQUID_MSWIN_ +#if !_SQUID_WINDOWS_ static const char *squid_start_script = "squid_start"; #endif @@ -586,7 +586,7 @@ rotate_logs(int sig) { do_rotate = 1; RotateSignal = sig; -#if !_SQUID_MSWIN_ && !HAVE_SIGACTION +#if !_SQUID_WINDOWS_ && !HAVE_SIGACTION signal(sig, rotate_logs); #endif } @@ -597,7 +597,7 @@ reconfigure(int sig) { do_reconfigure = 1; ReconfigureSignal = sig; -#if !_SQUID_MSWIN_ && !HAVE_SIGACTION +#if !_SQUID_WINDOWS_ && !HAVE_SIGACTION signal(sig, reconfigure); #endif } @@ -614,6 +614,7 @@ shut_down(int sig) #endif +#if !_SQUID_WINDOWS_ const pid_t ppid = getppid(); if (!IamMasterProcess() && ppid > 1) { @@ -623,7 +624,6 @@ shut_down(int sig) " pid " << ppid << ": " << xstrerror()); } -#if !_SQUID_MSWIN_ #if KILL_PARENT_OPT if (!IamMasterProcess() && ppid > 1) { @@ -989,7 +989,7 @@ mainInitialize(void) setSystemLimits(); debugs(1, 1, "With " << Squid_MaxFD << " file descriptors available"); -#if _SQUID_MSWIN_ +#if _SQUID_WINDOWS_ debugs(1, 1, "With " << _getmaxstdio() << " CRT stdio descriptors available"); @@ -1527,7 +1527,7 @@ sendSignal(void) WIN32_sendSignal(opt_send_signal); exit(0); } else -#if _SQUID_MSWIN_ +#if _SQUID_WINDOWS_ { fprintf(stderr, "%s: ERROR: Could not send ", APP_SHORTNAME); fprintf(stderr, "signal to Squid Service:\n"); @@ -1562,7 +1562,7 @@ sendSignal(void) exit(0); } -#if !_SQUID_MSWIN_ +#if !_SQUID_WINDOWS_ /* * This function is run when Squid is in daemon mode, just * before the parent forks and starts up the child process. @@ -1605,7 +1605,7 @@ mainStartScript(const char *prog) } } -#endif /* _SQUID_MSWIN_ */ +#endif /* _SQUID_WINDOWS_ */ static int checkRunningPid(void) @@ -1635,7 +1635,7 @@ checkRunningPid(void) static void watch_child(char *argv[]) { -#if !_SQUID_MSWIN_ +#if !_SQUID_WINDOWS_ char *prog; #if _SQUID_NEXT_ @@ -1803,7 +1803,7 @@ watch_child(char *argv[]) } /* NOTREACHED */ -#endif /* _SQUID_MSWIN_ */ +#endif /* _SQUID_WINDOWS_ */ } -- 2.47.2