]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: spoa-server: With debug mode, start only one process
authorThierry FOURNIER <thierry.fournier@ozon.io>
Fri, 23 Feb 2018 18:11:47 +0000 (19:11 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 13 May 2019 15:43:47 +0000 (17:43 +0200)
Because debug with processes is simpler if only one process is started.

contrib/spoa_server/spoa.c

index c7625414e5a4bb05cd028acde72efa20375c198c..3766c47e6d44dedb56b5ece97664172172f81d23 100644 (file)
@@ -982,6 +982,10 @@ out:
 
 int process_create(pid_t *pid, void *(*ps)(void *), void *data)
 {
+       if (debug) {
+               ps(data);
+               exit(EXIT_SUCCESS);
+       }
        *pid = fork();
        if (*pid == -1)
                return -1;