geomyidae

A small C-based gopherd. (gopher://bitreich.org/1/scm/geomyidae)
git clone git://r-36.net/geomyidae
Log | Files | Refs | README | LICENSE

commit e48154791b3387b70536b62166fe8841df1b918f
parent 522c74dba4eb1ba5895fc39c8e9b1e13ef81e283
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(-)

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: