Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 01 Feb 2006 11:44:08 +0000
From:      Pete French <petefrench@ticketswitch.com>
To:        freebsd-stable@freebsd.org
Subject:   Restartable system call behaviour
Message-ID:  <E1F4GPA-000CBe-Du@dilbert.firstcallgroup.co.uk>

next in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1F4GPA-000CBe-Du>