public inbox for sid@sourceware.org
 help / color / mirror / Atom feed
* [patch] Restore correct flags in stdioConsole::read
@ 2003-07-14 18:47 Dave Brolley
  2003-07-15  5:41 ` Ben Elliston
  0 siblings, 1 reply; 2+ messages in thread
From: Dave Brolley @ 2003-07-14 18:47 UTC (permalink / raw)
  To: sid

[-- 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);
  }
  
  

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [patch] Restore correct flags in stdioConsole::read
  2003-07-14 18:47 [patch] Restore correct flags in stdioConsole::read Dave Brolley
@ 2003-07-15  5:41 ` Ben Elliston
  0 siblings, 0 replies; 2+ messages in thread
From: Ben Elliston @ 2003-07-15  5:41 UTC (permalink / raw)
  To: sid

Hi Dave

Dave Brolley <brolley@redhat.com> writes:

> 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.

I've no doubt this was due to a quirk in Cygwin (perhaps the dreaded
tri-sync problem) :-).  It's been so long now, though, that it has
probably been fixed and putting things right is a good way to find out
if it has!

Cheers, Ben

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-07-15  5:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-14 18:47 [patch] Restore correct flags in stdioConsole::read Dave Brolley
2003-07-15  5:41 ` Ben Elliston

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).