logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

isatty.3p (2315B)


  1. '\" et
  2. .TH ISATTY "3P" 2017 "IEEE/The Open Group" "POSIX Programmer's Manual"
  3. .\"
  4. .SH PROLOG
  5. This manual page is part of the POSIX Programmer's Manual.
  6. The Linux implementation of this interface may differ (consult
  7. the corresponding Linux manual page for details of Linux behavior),
  8. or the interface may not be implemented on Linux.
  9. .\"
  10. .SH NAME
  11. isatty
  12. \(em test for a terminal device
  13. .SH SYNOPSIS
  14. .LP
  15. .nf
  16. #include <unistd.h>
  17. .P
  18. int isatty(int \fIfildes\fP);
  19. .fi
  20. .SH DESCRIPTION
  21. The
  22. \fIisatty\fR()
  23. function shall test whether
  24. .IR fildes ,
  25. an open file descriptor, is associated with a terminal device.
  26. .SH "RETURN VALUE"
  27. The
  28. \fIisatty\fR()
  29. function shall return 1 if
  30. .IR fildes
  31. is associated with a terminal; otherwise, it shall return 0 and may set
  32. .IR errno
  33. to indicate the error.
  34. .SH ERRORS
  35. The
  36. \fIisatty\fR()
  37. function may fail if:
  38. .TP
  39. .BR EBADF
  40. The
  41. .IR fildes
  42. argument is not a valid open file descriptor.
  43. .TP
  44. .BR ENOTTY
  45. The file associated with the
  46. .IR fildes
  47. argument is not a terminal.
  48. .LP
  49. .IR "The following sections are informative."
  50. .SH EXAMPLES
  51. None.
  52. .SH "APPLICATION USAGE"
  53. The
  54. \fIisatty\fR()
  55. function does not necessarily indicate that a human being is available
  56. for interaction via
  57. .IR fildes .
  58. It is quite possible that non-terminal devices are connected to the
  59. communications line.
  60. .SH RATIONALE
  61. None.
  62. .SH "FUTURE DIRECTIONS"
  63. None.
  64. .SH "SEE ALSO"
  65. The Base Definitions volume of POSIX.1\(hy2017,
  66. .IR "\fB<unistd.h>\fP"
  67. .\"
  68. .SH COPYRIGHT
  69. Portions of this text are reprinted and reproduced in electronic form
  70. from IEEE Std 1003.1-2017, Standard for Information Technology
  71. -- Portable Operating System Interface (POSIX), The Open Group Base
  72. Specifications Issue 7, 2018 Edition,
  73. Copyright (C) 2018 by the Institute of
  74. Electrical and Electronics Engineers, Inc and The Open Group.
  75. In the event of any discrepancy between this version and the original IEEE and
  76. The Open Group Standard, the original IEEE and The Open Group Standard
  77. is the referee document. The original Standard can be obtained online at
  78. http://www.opengroup.org/unix/online.html .
  79. .PP
  80. Any typographical or formatting errors that appear
  81. in this page are most likely
  82. to have been introduced during the conversion of the source files to
  83. man page format. To report such errors, see
  84. https://www.kernel.org/doc/man-pages/reporting_bugs.html .