From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I72mJ-0006uD-9a for qemu-devel@nongnu.org; Sat, 07 Jul 2007 01:24:19 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1I72mH-0006tK-Sc for qemu-devel@nongnu.org; Sat, 07 Jul 2007 01:24:18 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I72mH-0006tF-Ky for qemu-devel@nongnu.org; Sat, 07 Jul 2007 01:24:17 -0400 Received: from static-71-162-243-5.phlapa.fios.verizon.net ([71.162.243.5] helo=grelber.thyrsus.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1I72mH-0003B0-52 for qemu-devel@nongnu.org; Sat, 07 Jul 2007 01:24:17 -0400 From: Rob Landley Subject: Re: [Qemu-devel] Missing system calls retries in case of EINTR Date: Fri, 6 Jul 2007 14:57:07 -0400 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200707061457.07925.rob@landley.net> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: frederic.roussel@access-company.com, Yigael Fleishman On Monday 25 June 2007 20:14:24 Yigael Fleishman wrote: > Running qemu on a Ubuntu Feisty host I've encountered an occasional > failure-to-launch problem. > I've used the "-serial /dev/ttyS0" at the command line, and qemu would > often exit printing "could not open serial device". > Looking in the srcs I've noticed that qemu_chr_open_tty does not retry the > 'open' syscall if it fails and errno=EINTR. > I've added a retry for such case and it seems to solve that specific > problem (see the following patch). > Furthermore, I've noticed that all open, read and some write calls in > vl.care not retried in such cases. Please don't play whack-a-mole with this. You probably want sigaction(SA_RESTART) when running system emulation. Rob -- "One of my most productive days was throwing away 1000 lines of code." - Ken Thompson.