From owner-freebsd-stable@FreeBSD.ORG Wed Feb 1 20:48:32 2006 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8EBF916A420 for ; Wed, 1 Feb 2006 20:48:32 +0000 (GMT) (envelope-from petefrench@ticketswitch.com) Received: from mail.ticketswitch.com (mail.ticketswitch.com [194.200.93.188]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0D03643D4C for ; Wed, 1 Feb 2006 20:48:31 +0000 (GMT) (envelope-from petefrench@ticketswitch.com) Received: from [172.16.1.6] (helo=dilbert.firstcallgroup.co.uk) by mail.ticketswitch.com with esmtp (Exim 4.52 (FreeBSD)) id 1F4Oty-0009NS-JD; Wed, 01 Feb 2006 20:48:30 +0000 Received: from petefrench by dilbert.firstcallgroup.co.uk with local (Exim 4.52 (FreeBSD)) id 1F4Oty-000JEi-9R; Wed, 01 Feb 2006 20:48:30 +0000 To: ivoras@fer.hr, peterjeremy@optushome.com.au In-Reply-To: <43E10E44.1040502@fer.hr> Message-Id: From: Pete French Date: Wed, 01 Feb 2006 20:48:30 +0000 Cc: freebsd-stable@freebsd.org Subject: Re: Restartable system call behaviour X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2006 20:48:32 -0000 > >>I have a piece of coode which does some networking, in which I see read > >>and write calls failing with 'Interrupted system call' from time to time. > > > > You will get EINTR if the interrupt occurs before any data is read > > or written. > > Will it also happen with recv() with MSG_WAITALL flag set? Actually I have narrowed this down now, and I wwas wrong in the original posting - I was getting the EINTR returned by connect. Now I am not sure if this is correct behaviour or not - if a signal has SA_RESTART set then it should restart, but connect returns EINTR and then continues to connect in the background. I had alwways belived that if system calls are restrtable then you will never see EINTR at all. Now I dont know if this is a problem with my understanding of how the system works, or an actual bug. have filed a pr anyway, just in case it *is* a bug. -pcf.