public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/marxin/heads/backport-12)] jobserver: fix fifo mode by opening pipe in proper mode
@ 2022-12-09  9:33 Martin Liska
  0 siblings, 0 replies; only message in thread
From: Martin Liska @ 2022-12-09  9:33 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:9270fc97d412cdabe449a20ce9493093d2afbc65

commit 9270fc97d412cdabe449a20ce9493093d2afbc65
Author: Martin Liska <mliska@suse.cz>
Date:   Tue Aug 16 08:22:29 2022 +0200

    jobserver: fix fifo mode by opening pipe in proper mode
    
    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.
    
    (cherry picked from commit 3f1c2f89f6b8b8d23a9072f8549b0a2c1de06b03)

Diff:
---
 gcc/opts-common.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/opts-common.cc b/gcc/opts-common.cc
index eed0eb7b799..98eb112cf68 100644
--- a/gcc/opts-common.cc
+++ b/gcc/opts-common.cc
@@ -2062,7 +2062,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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-12-09  9:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-09  9:33 [gcc(refs/users/marxin/heads/backport-12)] jobserver: fix fifo mode by opening pipe in proper mode Martin Liska

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).