Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Apr 1996 11:02:28 -0700 (PDT)
From:      "JULIAN Elischer" <julian@ref.tfs.com>
To:        bde@zeta.org.au (Bruce Evans)
Cc:        jraynard@dial.pipex.com, hackers@freebsd.org
Subject:   Re: Flaws in system() implementation?
Message-ID:  <199604251802.LAA25761@ref.tfs.com>
In-Reply-To: <199604250044.KAA29532@godzilla.zeta.org.au> from "Bruce Evans" at Apr 25, 96 10:44:43 am

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> 
> 
> >> > 1. Use of a wait union when an int would do.
> >> This is the correct POSIX thing to do..
> >> check the man page for wait.
> 
> >According to the 2.1.0-RELEASE man page, wait and friends use an int*
> >for the status variable.
> 
> That is the correct POSIX thing.
I stand corrected
LIBRARY
     Standard C Library (libc.a)

SYNOPSIS
     #include <sys/types.h>
     #include <sys/wait.h>
     pid_t wait(
          int *status_location);
     pid_t waitpid(
          pid_t process_id,
          int *status_location,
          int options);

> 
> >> > 3. Returns 0 if fork() fails, when -1 seems more appropriate.
> >>  POSIX says:
> 
> >Thanks for posting this, I don't have access to any POSIX specs
> >(except the odd snippet in books). What's the best way of getting hold
> >of them?
> 
> Joerg said that the draft POSIX spec is on the (old) WC Internet Info
> cdrom.  I haven't got it.

I have actually only got the x/open XPG4 spec which says that it is POSIX2 
compliant

> 
> It's less ambiguous than julianese :-).  It completely specifies the
gee thanks :)

I copied it  word for word from XPG4

> return value after a fork failure, at least in my copy, which says
> "shall return -1" instead of "returns -1".  "shall" is standardese that
> means that the implementation is non-conforming if it does anything
> else.  "should" would allow the implementation to screw up.
> 
> Bruce
> 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199604251802.LAA25761>