This is the mail archive of the
sid@sources.redhat.com
mailing list for the SID project.
[patch] Restore correct flags in stdioConsole::read
- From: Dave Brolley <brolley at redhat dot com>
- To: sid at sources dot redhat dot com
- Date: Mon, 14 Jul 2003 14:46:45 -0400
- Subject: [patch] Restore correct flags in stdioConsole::read
- Organization: Red Hat Canada, Ltd
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
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);
}