From owner-freebsd-current Wed Aug 13 08:21:17 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id IAA22359 for current-outgoing; Wed, 13 Aug 1997 08:21:17 -0700 (PDT) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id IAA22350 for ; Wed, 13 Aug 1997 08:21:09 -0700 (PDT) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.5/8.6.9) id BAA16131; Thu, 14 Aug 1997 01:19:37 +1000 Date: Thu, 14 Aug 1997 01:19:37 +1000 From: Bruce Evans Message-Id: <199708131519.BAA16131@godzilla.zeta.org.au> To: ache@nagual.pp.ru, terry@lambert.org Subject: Re: siginterrupt (was Re: Error in sleep !) Cc: current@FreeBSD.ORG, sos@sos.freebsd.dk Sender: owner-freebsd-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >> POSIX says that system calls will not be restarted by default (the >> historical System V behaviour for signals). > >Could you please send exact quote just about this particular thing? >Many times POSIX is very unclear or can be misinterpreted. It is usually very clear :-). I don't have the exact quote handy, but the main point is that sa_flags == 0 gives "normal" behaviour (with no restart, etc). POSIX doesn't define any interesting SA_* macros for the flags; it only reserves SA_*. Some systems define an SA_RESTART macro for restarting syscalls. >Currently siginterrupt and signal man pages says nothing about POSIX >conformance, so manpages are right independently of how we interpretate >POSIX. siginterrupt() and signal() aren't in POSIX. >> The problem is that if I send a normally ignored signal to sleep(1) >> after it goes to sleep but before the interval is expired, the >> sleep doesn't keep going. > >POSIX says exactly that _any_ non-blocked and non-ignored signal should >terminate sleep(3)/sleep(1) including default no-op signals like ^T, etc. sleep(1) always terminated on ^C (only caught signals are restarted). Bruce