handledcgi: show error message if execl fails - geomyidae - A small C-based gopherd.
       
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit e48154791b3387b70536b62166fe8841df1b918f
 (DIR) parent 522c74dba4eb1ba5895fc39c8e9b1e13ef81e283
 (HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org>
       Date:   Sun, 25 Jun 2017 20:56:08 +0200
       
       handledcgi: show error message if execl fails
       
       Signed-off-by: Christoph Lohmann <20h@r-36.net>
       
       Diffstat:
         handlr.c                            |       5 ++++-
       
       1 file changed, 4 insertions(+), 1 deletion(-)
       ---
 (DIR) diff --git a/handlr.c b/handlr.c
       @@ -222,7 +222,10 @@ handledcgi(int sock, char *file, char *port, char *base, char *args,
                                        break;
                        }
        
       -                execl(file, p, sear, args, ohost, port, (char *)nil);
       +                if (execl(file, p, sear, args, ohost, port, (char *)nil) == -1) {
       +                        perror("execl");
       +                        _exit(1);
       +                }
                case -1:
                        break;
                default: