isastream.c 108 B

1234567
  1. #include <stropts.h>
  2. #include <fcntl.h>
  3. int isastream(int fd)
  4. {
  5. return fcntl(fd, F_GETFD) < 0 ? -1 : 0;
  6. }