summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gtm/main/main.c1
-rw-r--r--src/gtm/proxy/proxy_main.c12
2 files changed, 12 insertions, 1 deletions
diff --git a/src/gtm/main/main.c b/src/gtm/main/main.c
index 240738d3b2..371ebcd7d5 100644
--- a/src/gtm/main/main.c
+++ b/src/gtm/main/main.c
@@ -747,6 +747,7 @@ main(int argc, char *argv[])
pqsignal(SIGTERM, GTM_SigleHandler);
pqsignal(SIGINT, GTM_SigleHandler);
pqsignal(SIGUSR1, GTM_SigleHandler);
+ pqsignal(SIGPIPE, SIG_IGN);
pqinitmask();
diff --git a/src/gtm/proxy/proxy_main.c b/src/gtm/proxy/proxy_main.c
index d76074fbf5..a9f141a5a1 100644
--- a/src/gtm/proxy/proxy_main.c
+++ b/src/gtm/proxy/proxy_main.c
@@ -865,6 +865,7 @@ main(int argc, char *argv[])
pqsignal(SIGINT, GTMProxy_SigleHandler);
pqsignal(SIGUSR1, GTMProxy_SigleHandler);
pqsignal(SIGUSR2, GTMProxy_SigleHandler);
+ pqsignal(SIGPIPE, SIG_IGN);
pqinitmask();
@@ -3241,7 +3242,16 @@ UnregisterProxy(void)
return;
failed:
- return elog(ERROR, "can not Unregister Proxy on GTM");
+ /*
+ * We don't deliberately write an ERROR here to ensure that proxy shutdown
+ * proceeds to the end. Without that we have a danger of leaving behind a
+ * stale PID file, thus causing gtm_ctl stop to wait forever for the proxy
+ * to shutdown
+ *
+ * XXX This can happen when GTM restarts, clearing existing registration
+ * information. See if this needs to fixed
+ */
+ return elog(LOG, "can not Unregister Proxy on GTM");
}
/*