Tighten check for --forkchild argument when spawning child process
authorHeikki Linnakangas <[email protected]>
Wed, 3 Jul 2024 12:53:30 +0000 (15:53 +0300)
committerHeikki Linnakangas <[email protected]>
Wed, 3 Jul 2024 12:53:30 +0000 (15:53 +0300)
Commit aafc05de1b removed all the other --fork* arguments. Altough
this is inconsequential, backpatch to v17 since this is new.

Author: Nathan Bossart
Discussion: https://www.postgresql.org/message-id/ZnCCEN0l3qWv-XpW@nathan

src/backend/main/main.c

index bfd0c5ed6584f260f575163a9f516ed16420ab9b..4672aab83786ce41235f4719c30b2fc02d5d63b4 100644 (file)
@@ -185,7 +185,7 @@ main(int argc, char *argv[])
    else if (argc > 1 && strcmp(argv[1], "--boot") == 0)
        BootstrapModeMain(argc, argv, false);
 #ifdef EXEC_BACKEND
-   else if (argc > 1 && strncmp(argv[1], "--fork", 6) == 0)
+   else if (argc > 1 && strncmp(argv[1], "--forkchild", 11) == 0)
        SubPostmasterMain(argc, argv);
 #endif
    else if (argc > 1 && strcmp(argv[1], "--describe-config") == 0)