From owner-freebsd-stable@FreeBSD.ORG Wed Feb 1 11:44:12 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 BDABD16A420 for ; Wed, 1 Feb 2006 11:44:12 +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 66EA643D53 for ; Wed, 1 Feb 2006 11:44:12 +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 1F4GPA-000EoJ-QQ for freebsd-stable@freebsd.org; Wed, 01 Feb 2006 11:44:08 +0000 Received: from petefrench by dilbert.firstcallgroup.co.uk with local (Exim 4.52 (FreeBSD)) id 1F4GPA-000CBe-Du for freebsd-stable@freebsd.org; Wed, 01 Feb 2006 11:44:08 +0000 To: freebsd-stable@freebsd.org Message-Id: From: Pete French Date: Wed, 01 Feb 2006 11:44:08 +0000 Subject: 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 11:44:12 -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. The reason it puzzles me is that I am explicitly catching every signal that could possibly be causing this, with the SA_RESTART flag set. So surely I should never see this ? This only started happening when we moved away from 4.11 - it was happening the whole time I was running on 5.4 and still happens on 6.0. I thought that the default was for restartable system calls - I only started setting the SA_RESTART flag explicitly in the last 24 hours in an effort to fix this, but it is still happening. Have I missed something fundamental about signals and system calls ? I am about to go in and adapt my code so that it retries the system call if it is interrupted - but I am uneasy about doing this without knowing *why* the system calls arent't restarting automaticly. -pcf.