[bind10-dev] -1 is a legal PID
Michal 'vorner' Vaner
michal.vaner at nic.cz
Mon Aug 27 15:18:33 UTC 2012
Hello
(We got out of the list by accident, returning there)
On Mon, Aug 27, 2012 at 02:59:54PM +0000, Francis Dupont wrote:
> > On Mon, Aug 27, 2012 at 12:19:49PM +0000, Francis Dupont wrote:
> > > src/lib/util/unittests/fork.* is IMHO wrong: it overloads the result
> > > between the child pid and -1 for error. The problem is that -1 is a
> > > legal pid value. If nobody objects I'll open a new ticket and propose
> > > a fix.
> >
> > The fork man page says this:
> > On failure, -1 is returned in the parent, no child process is created, and
> > errno is set appropriately.
> >
> > How does -1 as legal PID fit into this?
>
> => on a system where fork() is not a system call, i.e., you assume the
> 'man fork' of your Linux applies everywhere.
Well, I kind of think that where fork is not available, we won't be using that,
but something else. As the name of file suggests, it's probably unix-specific
and needs fork to work. It was used in unittests because it was the easiest way
to go then.
With regards
--
All flame and insults will go to /dev/null (if they fit)
Michal 'vorner' Vaner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <https://lists.isc.org/pipermail/bind10-dev/attachments/20120827/5ef00592/attachment.bin>
More information about the bind10-dev
mailing list