home *** CD-ROM | disk | FTP | other *** search
/ Atari FTP / ATARI_FTP_0693.zip / ATARI_FTP_0693 / Mint / mntlib25.zoo / fork.c < prev    next >
C/C++ Source or Header  |  1992-09-05  |  260b  |  23 lines

  1. /* public domain fork() for MiNT */
  2.  
  3. #include <errno.h>
  4. #include "mintbind.h"
  5.  
  6. int
  7. fork()
  8. {
  9.     int r;
  10.     extern int __mint;
  11.  
  12.     if (__mint == 0)
  13.         r = -EINVAL;
  14.     else
  15.         r = (int)Pfork();
  16.  
  17.     if (r < 0) {
  18.         errno = -r;
  19.         return -1;
  20.     }
  21.     return r;
  22. }
  23.