From: Dave Brolley <brolley@redhat.com>
To: sid@sources.redhat.com
Subject: [patch] Restore correct flags in stdioConsole::read
Date: Mon, 14 Jul 2003 18:47:00 -0000 [thread overview]
Message-ID: <3F12FA95.2050509@redhat.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 421 bytes --]
Hi,
I've committed the attached patch which restores the original flags in
stdioConsole::read. The existing code was turning off O_NONBLOCK
regardless of whether it was previously off.
FWIW, I found this while investigating a problem on my RHL8.0 system in
which this function blocks when sid is running in the background. This
patch is just something I noticed while looking. It does not solve the
problem.
Dave
[-- Attachment #2: stdio-flags.patch.txt --]
[-- Type: text/plain, Size: 1160 bytes --]
Index: sid/component/consoles/stdio.cxx
===================================================================
RCS file: /cvs/src/src/sid/component/consoles/stdio.cxx,v
retrieving revision 1.2
diff -c -p -r1.2 stdio.cxx
*** sid/component/consoles/stdio.cxx 17 Jan 2001 21:05:09 -0000 1.2
--- sid/component/consoles/stdio.cxx 14 Jul 2003 18:40:55 -0000
***************
*** 1,7 ****
// stdio.cxx - A simple console that uses standard I/O for
// enunciation. -*- C++ -*-
! // Copyright (C) 1999, 2000 Red Hat.
// This file is part of SID and is licensed under the GPL.
// See the file COPYING.SID for conditions for redistribution.
--- 1,7 ----
// stdio.cxx - A simple console that uses standard I/O for
// enunciation. -*- C++ -*-
! // Copyright (C) 1999, 2000, 2003 Red Hat.
// This file is part of SID and is licensed under the GPL.
// See the file COPYING.SID for conditions for redistribution.
*************** stdioConsole::read(host_int_4)
*** 49,55 ****
}
// Restore flags.
! fcntl(0, F_SETFL, flags & ~O_NONBLOCK);
}
--- 49,55 ----
}
// Restore flags.
! fcntl(0, F_SETFL, flags);
}
next reply other threads:[~2003-07-14 18:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-14 18:47 Dave Brolley [this message]
2003-07-15 5:41 ` Ben Elliston
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=3F12FA95.2050509@redhat.com \
--to=brolley@redhat.com \
--cc=sid@sources.redhat.com \
/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).