]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
jobserver: fix fifo mode by opening pipe in proper mode
authorMartin Liska <mliska@suse.cz>
Tue, 16 Aug 2022 06:22:29 +0000 (08:22 +0200)
committerMartin Liska <mliska@suse.cz>
Tue, 16 Aug 2022 06:23:35 +0000 (08:23 +0200)
The current jobserver_info relies on non-blocking FDs,
thus one the pipe in such mode.

gcc/ChangeLog:

* opts-common.cc (jobserver_info::connect): Open fifo
in non-blocking mode.

gcc/opts-common.cc

index 5d79f174a3896357ce9935efb2767b9dc808ddca..4dec9f94447f4e4fd66406d1e1e43af149a4cacd 100644 (file)
@@ -2064,7 +2064,7 @@ void
 jobserver_info::connect ()
 {
   if (!pipe_path.empty ())
-    pipefd = open (pipe_path.c_str (), O_RDWR);
+    pipefd = open (pipe_path.c_str (), O_RDWR | O_NONBLOCK);
 }
 
 void