]> git.ipfire.org Git - thirdparty/make.git/commitdiff
* src/posixos.c (osync_clear): Don't close invalid FDs.
authorPaul Smith <psmith@gnu.org>
Sat, 24 Sep 2022 22:31:51 +0000 (18:31 -0400)
committerPaul Smith <psmith@gnu.org>
Sun, 25 Sep 2022 17:37:12 +0000 (13:37 -0400)
src/posixos.c

index 8693b74e7dabe8c2bae4754e37afdfccc1d48df9..d587f9c85449ea71ea5ae9478bbf37abc0e3c1c3 100644 (file)
@@ -668,7 +668,7 @@ osync_parse_mutex (const char *mutex)
 void
 osync_clear ()
 {
-  if (osync_handle)
+  if (osync_handle >= 0)
     {
       close (osync_handle);
       osync_handle = -1;