From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17013 invoked by alias); 14 Jul 2003 18:47:01 -0000 Mailing-List: contact sid-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: sid-owner@sources.redhat.com Received: (qmail 16993 invoked from network); 14 Jul 2003 18:46:51 -0000 Received: from unknown (HELO touchme.toronto.redhat.com) (207.219.125.105) by sources.redhat.com with SMTP; 14 Jul 2003 18:46:51 -0000 Received: from redhat.com (topaz.toronto.redhat.com [172.16.14.227]) by touchme.toronto.redhat.com (Postfix) with ESMTP id BE5358000DB for ; Mon, 14 Jul 2003 14:46:45 -0400 (EDT) Message-ID: <3F12FA95.2050509@redhat.com> Date: Mon, 14 Jul 2003 18:47:00 -0000 From: Dave Brolley Organization: Red Hat Canada, Ltd User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.2) Gecko/20021216 X-Accept-Language: en-us, en MIME-Version: 1.0 To: sid@sources.redhat.com Subject: [patch] Restore correct flags in stdioConsole::read Content-Type: multipart/mixed; boundary="------------060600010505070400050305" X-SW-Source: 2003-q3/txt/msg00005.txt.bz2 This is a multi-part message in MIME format. --------------060600010505070400050305 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 421 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 --------------060600010505070400050305 Content-Type: text/plain; name="stdio-flags.patch.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="stdio-flags.patch.txt" Content-length: 1160 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); } --------------060600010505070400050305--