autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [autoconf] AmigaOS fork()


From: Paul Eggert
Subject: Re: [autoconf] AmigaOS fork()
Date: Mon, 11 Jun 2001 17:31:41 -0700 (PDT)

> From: Akim Demaille <address@hidden>
> Date: 11 Jun 2001 23:07:29 +0200
>
> I wanted to have some feedback from Jim and Paul...  If you two guys
> don't have time to give a look at it, than I'll apply it on Wednesday.

I read through <http://sources.redhat.com/ml/autoconf/2001-06/msg00009.html>
and have the following comments.

* The documentation says that AC_FUNC_FORK "only checks whether `fork'
  is just a stub."  But that's not correct when not cross-compiling:
  AC_FUNC_FORK actually runs a program that tries to fork.

* AC_FUNC_FORK outputs a warning if neither fork nor vfork works.  But
  this warning is unnecessary and is not in the style of autoconf.
  The whole point of invoking AC_FUNC_FORK is to test whether fork
  and/or vfork works.

* I found the 'forkvfork' function name and explanation to be quite
  confusing.  Part of the confusion is because the Unix tradition is
  that code that uses 'vfork' can be safely changed to use 'fork' if
  you like.  I don't see why AmigaOS violates the Unix tradition, so
  long as "if you like" is always equivalent to "never" under AmigaOS.

  Unless I'm missing something, I suggest omitting the suggestion
  about forkvfork in the documentation.  The suggestion about vfork is
  OK, but the documentation should also make it clearer that it is now
  an obsolescent feature that AC_FUNC_FORK defines 'vfork'.

* In a couple of places I saw this code:

    #if !HAVE_WORKING_FORK
    # define fork vfork
    #endif

  This is related to the confusion of the previous bullet.
  I would replace this code with  

    #if !HAVE_WORKING_VFORK
    # define vfork fork
    #endif

  and then use "vfork" uniformly in the later code.  (In other words,
  the autoconf tests should follow autoconf's own advice.  :-)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]