On Tue, May 09, 2006 at 04:44:32PM +0200, Nikolai Weibull wrote:
> On 5/9/06, Matthew Winn <[EMAIL PROTECTED]> wrote:
> >On Tue, May 09, 2006 at 02:02:24PM +0200, Nikolai Weibull wrote:
> >> Well, there's always the following algorithm to consider:
> >>
> >> if (bram_is_unreasonable) {
> >>  int new_child = fork();
> >>  if (new_child) {
> >>    // Let Bram continue in his thought-process
> >>    return;
> >>  }
> >>
> >>  // Ah, this is now our little baby
> >>  :
> >>  :
> >> }
> >
> >And if fork() returns -1?
> 
> It's obvious, isn't it?

Yes.  The poor little baby never gets conceived.  You should at least
issue a warning, or possibly loop until conception occurs.

P.S. Don't try this with vfork().

-- 
Matthew Winn ([EMAIL PROTECTED])

Reply via email to