[bind10-dev] -1 is a legal PID

Francis Dupont fdupont at isc.org
Mon Aug 27 16:17:30 UTC 2012


> 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.

=> yes, this defect (*) is Unix specific. On Windows for instance
the corresponding call returns a handle (or NULL) even there are
PIDs too (and _getpid() which can't fail too). My concern is to
not propagate the defect to bind10.

Regards

Francis Dupont <fdupont at isc.org>

PS: IMHO to put the error value in a type where it is a priori a
legal value is a defect in the design and introduces portability
problems. BTW Unix is not consistent because getpid() can't fail
but nowhere it is explained it can't return (pid_t) -1...


More information about the bind10-dev mailing list