From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sc8-sf-mx2-b.sourceforge.net ([10.3.1.12] helo=sc8-sf-mx2.sourceforge.net) by sc8-sf-list1.sourceforge.net with esmtp (Exim 4.30) id 1Br7L4-00054t-HF for user-mode-linux-devel@lists.sourceforge.net; Sat, 31 Jul 2004 20:48:46 -0700 Received: from sccrmhc13.comcast.net ([204.127.202.64]) by sc8-sf-mx2.sourceforge.net with esmtp (Exim 4.34) id 1Br7L4-0001Pi-6s for user-mode-linux-devel@lists.sourceforge.net; Sat, 31 Jul 2004 20:48:46 -0700 Message-ID: <410C67B1.4070402@hevanet.com> From: Matt Clay MIME-Version: 1.0 Subject: Re: [uml-devel] Re: Bug#260111: user-mode-linux: upgrade hangs at "NET4: Linux TCP/IP 1.0 for NET4.0 " References: <200407280315.08207.alydar@users.sourceforge.net> <200407281722.i6SHM6eh002963@ccure.user-mode-linux.org> <200407291430.18818.alydar@users.sourceforge.net> <200407292234.04279.alydar@users.sourceforge.net> <200407301723.i6UHNeUE002844@ccure.user-mode-linux.org> <410A833F.9030207@hevanet.com> <200407301849.i6UInpUE003226@ccure.user-mode-linux.org> <410C6367.3090206@hevanet.com> In-Reply-To: <410C6367.3090206@hevanet.com> Content-Type: multipart/mixed; boundary="------------070702000406090009000605" Sender: user-mode-linux-devel-admin@lists.sourceforge.net Errors-To: user-mode-linux-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Id: The user-mode Linux development list List-Post: List-Help: List-Subscribe: , List-Archive: Date: Sat, 31 Jul 2004 20:46:57 -0700 To: Matt Clay Cc: Jeff Dike , Allen Chan , user-mode-linux-devel@lists.sourceforge.net, 260111@bugs.debian.org This is a multi-part message in MIME format. --------------070702000406090009000605 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Matt Clay wrote: > > This patch seems to fix the problem by adding error handling to > the tcsetattr call in generic_console_write. Looks like pasting the patch inline wasn't a good idea. I've attached the patch this time. - Matt --------------070702000406090009000605 Content-Type: text/plain; name="tcsetattr_check" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="tcsetattr_check" --- um.orig/arch/um/drivers/chan_kern.c 2004-07-26 11:43:52.000000000 -0700 +++ um/arch/um/drivers/chan_kern.c 2004-07-31 19:38:51.000000000 -0700 @@ -117,15 +117,15 @@ { struct termios save, new; int err; + int changed = 0; - if(isatty(fd)){ - tcgetattr(fd, &save); + if(isatty(fd) && tcgetattr(fd, &save) == 0) { new = save; new.c_oflag |= OPOST; - tcsetattr(fd, TCSAFLUSH, &new); + if(tcsetattr(fd, TCSAFLUSH, &new) == 0) changed = 1; } err = generic_write(fd, buf, n, NULL); - if(isatty(fd)) tcsetattr(fd, TCSAFLUSH, &save); + if(changed) tcsetattr(fd, TCSAFLUSH, &save); return(err); } --------------070702000406090009000605-- ------------------------------------------------------- This SF.Net email is sponsored by OSTG. Have you noticed the changes on Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, one more big change to announce. We are now OSTG- Open Source Technology Group. Come see the changes on the new OSTG site. www.ostg.com _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel