public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Martin Liska <marxin@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc(refs/users/marxin/heads/backport-12)] jobserver: fix fifo mode by opening pipe in proper mode
Date: Fri,  9 Dec 2022 09:33:45 +0000 (GMT)	[thread overview]
Message-ID: <20221209093345.985E5395B073@sourceware.org> (raw)

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

                 reply	other threads:[~2022-12-09  9:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221209093345.985E5395B073@sourceware.org \
    --to=marxin@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).