aboutsummaryrefslogtreecommitdiff
path: root/src/backend/replication
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2015-01-13 13:12:37 +0100
committerAndres Freund <andres@anarazel.de>2015-01-14 00:33:14 +0100
commit31c453165b5a656044ce1dbce89f5828c1c7e23c (patch)
treeccf0a682b390361d581a7116d6244d7feb80cd45 /src/backend/replication
parent2be82dcf17a18511df5153bcafe67a9c1387be1e (diff)
downloadpostgresql-31c453165b5a656044ce1dbce89f5828c1c7e23c.tar.gz
postgresql-31c453165b5a656044ce1dbce89f5828c1c7e23c.zip
Commonalize process startup code.
Move common code, that was duplicated in every postmaster child/every standalone process, into two functions in miscinit.c. Not only does that already result in a fair amount of net code reduction but it also makes it much easier to remove more duplication in the future. The prime motivation wasn't code deduplication though, but easier addition of new common code.
Diffstat (limited to 'src/backend/replication')
-rw-r--r--src/backend/replication/walreceiver.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/src/backend/replication/walreceiver.c b/src/backend/replication/walreceiver.c
index 3dbefc603b0..bfbc02f02ac 100644
--- a/src/backend/replication/walreceiver.c
+++ b/src/backend/replication/walreceiver.c
@@ -256,17 +256,6 @@ WalReceiverMain(void)
OwnLatch(&walrcv->latch);
- /*
- * If possible, make this process a group leader, so that the postmaster
- * can signal any child processes too. (walreceiver probably never has
- * any child processes, but for consistency we make all postmaster child
- * processes do this.)
- */
-#ifdef HAVE_SETSID
- if (setsid() < 0)
- elog(FATAL, "setsid() failed: %m");
-#endif
-
/* Properly accept or ignore signals the postmaster might send us */
pqsignal(SIGHUP, WalRcvSigHupHandler); /* set flag to read config
* file */