From: KO Myung-Hun Date: Mon, 18 Jan 2021 16:40:13 +0000 (+0900) Subject: spawn-pipe: Fix SIGSEGV on OS/2 kLIBC. X-Git-Tag: v1.0~3139 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=2ef5a9b4b25381bc4805adf13f9f3a266af9c313;p=gnulib.git spawn-pipe: Fix SIGSEGV on OS/2 kLIBC. * lib/spawn-pipe.c [OS/2 kLIBC]: Check directory correctly if it means a current directory. --- diff --git a/ChangeLog b/ChangeLog index 94a6b5f52c..269577caa0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2021-01-19 KO Myung-Hun + + spawn-pipe: Fix SIGSEGV on OS/2 kLIBC. + * lib/spawn-pipe.c [OS/2 kLIBC]: Check directory correctly if it means + a current directory. + 2021-01-19 KO Myung-Hun dirent: Fix compilation error in C++ mode on OS/2 kLIBC. diff --git a/lib/spawn-pipe.c b/lib/spawn-pipe.c index 641e9216fb..0fe86ffe2c 100644 --- a/lib/spawn-pipe.c +++ b/lib/spawn-pipe.c @@ -341,7 +341,7 @@ create_pipe (const char *progname, } # else /* __KLIBC__ */ - if (!(directory == NULL && strcmp (directory, ".") == 0)) + if (!(directory == NULL || strcmp (directory, ".") == 0)) { /* A directory argument is not supported in this implementation. */ saved_errno = EINVAL;