home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / pdksh-4.9-src.tgz / tar.out / contrib / pdksh / sh / amiga.c < prev    next >
C/C++ Source or Header  |  1996-09-28  |  794b  |  31 lines

  1. #include <errno.h>
  2. #include <fcntl.h>
  3.  
  4. int
  5. fork()
  6. {
  7.   /* we don't have fork(). If I missed some fork-call (or if there's one
  8.      in a later version of the shell), just return with out-of-processes. */
  9.   errno = EPROCLIM;
  10.  
  11.   return -1;
  12. }
  13.  
  14. int
  15. tty_read (int fd, char *buf, int len)
  16. {
  17.   int mask = 1<<fd;
  18.   
  19.   /* read by itself is not interruptible, select() is. Perhaps this will
  20.      change some time in the future.. */
  21.   while (select (fd+1, &mask, 0, 0, 0) <= 0) ;
  22.  
  23.   return read (fd, buf, len);
  24. }
  25.  
  26. /* should update the library.... the header prototypes are *pgid(), and
  27.    POSIX *pgrp(), but the library doesn't contain the Posix versions yet,
  28.    and uses oldstyle BSD *pgrp() functions... */
  29. int setpgid (int p, int q) { return setpgrp (p, q); }
  30. int getpgid (int p) { return getpgrp (p); }
  31.