[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Ian Lance Taylor
07 Sep 2003 14:11:22 -0700
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
Paul Eggert <address@hidden> writes:
> > I'm thinking of older systems. As far as I know SA_RESTART was
> > introduced by Solaris. I doubt it is in SVR4.2, for example, though I
> > admit that I don't have a way to check.
> Rich Stevens wrote in 1991 that SA_RESTART was in SVID Issue 3,
> in SVR4, and in 4.3BSD Reno. See:
Ah, OK. I have SVID Issue 2, which doesn't have it.
> > I checked Ultrix 4.0, and it has sigaction but does not have SA_RESTART.
> That was released in 1990, right? It was probably based on 4.3BSD
> Tahoe then, and I guess Tahoe didn't have it. Reno came out in June 1990.
I think it's actually based on 4.2BSD, with a lot of stuff added on
for increased System V compatibility.
> > AC_DEFUN([AC_SYS_RESTARTABLE_SYSCALLS],
> > [AC_DIAGNOSE([obsolete],
> > [$0: System call restartability is now typically set at runtime.
> > Remove this `AC_SYS_RESTARTABLE_SYSCALLS'
> > and adjust your code to use `sigaction' with `SA_RESTART' instead.])dnl
> Perhaps that's a bit draconian. Can you suggest a better wording for
> that diagnostic?
How about something like this:
$0: AC_SYS_RESTARTABLE_SYSCALLS is only useful when supporting old
systems which do not provide `sigaction'. Don't use this macro unless
you intend to support very old systems.
The point is that people shouldn't check AC_SYS_RESTARTABLE_SYSCALLS
because they want restartable system calls. They should check it to
see if that is all they can expect.
(I think that restartable system calls are a superficially attractive
idea which interacts poorly with the Unix I/O interface, because they
leave you with no good way to do a timed read or write. If Unix had a
standard interface for a timed read/write of up to N characters, then
restartable system calls make a lot of sense. Admittedly efficient
Unix serial I/O is a black art anyhow.)
> Wouldn't it be better for uucp to determine the value dynamically?
> That should be fairly easy to do, by running a bit of test code. Then
> you wouldn't need to guess, and you wouldn't need
> AC_SYS_RESTARTABLE_SYSCALLS either. (You would need an ancient system
> to test it on, but I guess if you have Ultrix 4.0 then that is ancient
> enough. :-)
I couldn't think of any dynamic test which ran quickly. Note that the
autoconf test takes a few seconds. It's not worth taking a few
seconds to run a dynamic test every time uucico starts up to make a