diff mbox series

[pushed] jobserver: fix fifo mode by opening pipe in proper mode

Message ID df785d6b-ffda-0299-e51d-5c0c08074d99@suse.cz
State New
Headers show
Series [pushed] jobserver: fix fifo mode by opening pipe in proper mode | expand

Commit Message

Martin Liška Aug. 16, 2022, 6:24 a.m. UTC
The current jobserver_info relies on non-blocking FDs,
thus one the pipe in such mode.

Tested locally for GCC LTO bootstrap that was stuck before the revision.

I'm going to push the change.

Martin

gcc/ChangeLog:

	* opts-common.cc (jobserver_info::connect): Open fifo
	in non-blocking mode.
---
 gcc/opts-common.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/gcc/opts-common.cc b/gcc/opts-common.cc
index 5d79f174a38..4dec9f94447 100644
--- a/gcc/opts-common.cc
+++ b/gcc/opts-common.cc
@@ -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