------------------------------------------------------------ revno: 13618 revision-id: squid3@treenet.co.nz-20140930131158-ajzas7x8d3dfmigm parent: squid3@treenet.co.nz-20140929134103-w6sv3z725ovkweg0 committer: Amos Jeffries branch nick: trunk timestamp: Tue 2014-09-30 06:11:58 -0700 message: Windows: getppid() is not supported. The PID and thus parent process PID concept is not available in Windows and MinGW at least lacks the API mechanism. This may re-open an issue with kid processes notifying the coordinator when they are shutting down. If so we need to find an alternative mechanism to replace this use of kill(getppid(), SIGUSR1) ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20140930131158-ajzas7x8d3dfmigm # target_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # testament_sha1: a08ea408c53bb45f4f0df9b55f7416fd6d740cff # timestamp: 2014-10-02 09:21:33 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # base_revision_id: squid3@treenet.co.nz-20140929134103-\ # w6sv3z725ovkweg0 # # Begin patch === modified file 'src/main.cc' --- src/main.cc 2014-09-13 13:59:43 +0000 +++ src/main.cc 2014-09-30 13:11:58 +0000 @@ -620,13 +620,12 @@ { do_shutdown = sig == SIGINT ? -1 : 1; ShutdownSignal = sig; -#ifdef SIGTTIN - +#if defined(SIGTTIN) if (SIGTTIN == sig) shutdown_status = 1; - #endif +#if !_SQUID_WINDOWS_ const pid_t ppid = getppid(); if (!IamMasterProcess() && ppid > 1) { @@ -636,17 +635,15 @@ " pid " << ppid << ": " << xstrerror()); } -#if !_SQUID_WINDOWS_ #if KILL_PARENT_OPT - if (!IamMasterProcess() && ppid > 1) { debugs(1, DBG_IMPORTANT, "Killing master process, pid " << ppid); if (kill(ppid, sig) < 0) debugs(1, DBG_IMPORTANT, "kill " << ppid << ": " << xstrerror()); } - #endif /* KILL_PARENT_OPT */ + #if SA_RESETHAND == 0 signal(SIGTERM, SIG_DFL);