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

mesg.1p (5660B)


  1. '\" et
  2. .TH MESG "1P" 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. mesg
  12. \(em permit or deny messages
  13. .SH SYNOPSIS
  14. .LP
  15. .nf
  16. mesg \fB[\fRy|n\fB]\fR
  17. .fi
  18. .SH DESCRIPTION
  19. The
  20. .IR mesg
  21. utility shall control whether other users are allowed to send messages
  22. via
  23. .IR write ,
  24. .IR talk ,
  25. or other utilities to a terminal device. The terminal device affected
  26. shall be determined by searching for the first terminal in the sequence
  27. of devices associated with standard input, standard output, and
  28. standard error, respectively. With no arguments,
  29. .IR mesg
  30. shall report the current state without changing it. Processes with
  31. appropriate privileges may be able to send messages to the terminal
  32. independent of the current state.
  33. .SH OPTIONS
  34. None.
  35. .SH OPERANDS
  36. The following operands shall be supported in the POSIX locale:
  37. .IP "\fIy\fR" 10
  38. Grant permission to other users to send messages to the terminal
  39. device.
  40. .IP "\fIn\fR" 10
  41. Deny permission to other users to send messages to the terminal
  42. device.
  43. .SH STDIN
  44. Not used.
  45. .SH "INPUT FILES"
  46. None.
  47. .SH "ENVIRONMENT VARIABLES"
  48. The following environment variables shall affect the execution of
  49. .IR mesg :
  50. .IP "\fILANG\fP" 10
  51. Provide a default value for the internationalization variables that are
  52. unset or null. (See the Base Definitions volume of POSIX.1\(hy2017,
  53. .IR "Section 8.2" ", " "Internationalization Variables"
  54. for the precedence of internationalization variables used to determine
  55. the values of locale categories.)
  56. .IP "\fILC_ALL\fP" 10
  57. If set to a non-empty string value, override the values of all the
  58. other internationalization variables.
  59. .IP "\fILC_CTYPE\fP" 10
  60. Determine the locale for the interpretation of sequences of bytes of
  61. text data as characters (for example, single-byte as opposed to
  62. multi-byte characters in arguments).
  63. .IP "\fILC_MESSAGES\fP" 10
  64. .br
  65. Determine the locale that should be used to affect the format and
  66. contents of diagnostic messages written (by
  67. .IR mesg )
  68. to standard error.
  69. .IP "\fINLSPATH\fP" 10
  70. Determine the location of message catalogs for the processing of
  71. .IR LC_MESSAGES .
  72. .SH "ASYNCHRONOUS EVENTS"
  73. Default.
  74. .SH STDOUT
  75. If no operand is specified,
  76. .IR mesg
  77. shall display the current terminal state in an unspecified format.
  78. .SH STDERR
  79. The standard error shall be used only for diagnostic messages.
  80. .SH "OUTPUT FILES"
  81. None.
  82. .SH "EXTENDED DESCRIPTION"
  83. None.
  84. .SH "EXIT STATUS"
  85. The following exit values shall be returned:
  86. .IP "\00" 6
  87. Receiving messages is allowed.
  88. .IP "\01" 6
  89. Receiving messages is not allowed.
  90. .IP >1 6
  91. An error occurred.
  92. .SH "CONSEQUENCES OF ERRORS"
  93. Default.
  94. .LP
  95. .IR "The following sections are informative."
  96. .SH "APPLICATION USAGE"
  97. The mechanism by which the message status of the terminal is changed is
  98. unspecified. Therefore, unspecified actions may cause the status of
  99. the terminal to change after
  100. .IR mesg
  101. has successfully completed. These actions may include, but are not
  102. limited to: another invocation of the
  103. .IR mesg
  104. utility, login procedures; invocation of the
  105. .IR stty
  106. utility, invocation of the
  107. .IR chmod
  108. utility or
  109. \fIchmod\fR()
  110. function, and so on.
  111. .SH EXAMPLES
  112. None.
  113. .SH RATIONALE
  114. The terminal changed by
  115. .IR mesg
  116. is that associated with the standard input, output, or error, rather
  117. than the controlling terminal for the session. This is because users
  118. logged in more than once should be able to change any of their login
  119. terminals without having to stop the job running in those sessions.
  120. This is not a security problem involving the terminals of other users
  121. because appropriate privileges would
  122. be required to affect the terminal of another user.
  123. .P
  124. The method of checking each of the first three file descriptors in
  125. sequence until a terminal is found was adopted from System V.
  126. .P
  127. The file
  128. .BR /dev/tty
  129. is not specified for the terminal device because it was thought to be
  130. too restrictive. Typical environment changes for the
  131. .IR n
  132. operand are that write permissions are removed for
  133. .IR others
  134. and
  135. .IR group
  136. from the appropriate device. It was decided to leave the actual
  137. description of what is done as unspecified because of potential
  138. differences between implementations.
  139. .P
  140. The format for standard output is unspecified because of differences
  141. between historical implementations. This output is generally not
  142. useful to shell scripts (they can use the exit status), so exact
  143. parsing of the output is unnecessary.
  144. .SH "FUTURE DIRECTIONS"
  145. None.
  146. .SH "SEE ALSO"
  147. .IR "\fItalk\fR\^",
  148. .IR "\fIwrite\fR\^"
  149. .P
  150. The Base Definitions volume of POSIX.1\(hy2017,
  151. .IR "Chapter 8" ", " "Environment Variables"
  152. .\"
  153. .SH COPYRIGHT
  154. Portions of this text are reprinted and reproduced in electronic form
  155. from IEEE Std 1003.1-2017, Standard for Information Technology
  156. -- Portable Operating System Interface (POSIX), The Open Group Base
  157. Specifications Issue 7, 2018 Edition,
  158. Copyright (C) 2018 by the Institute of
  159. Electrical and Electronics Engineers, Inc and The Open Group.
  160. In the event of any discrepancy between this version and the original IEEE and
  161. The Open Group Standard, the original IEEE and The Open Group Standard
  162. is the referee document. The original Standard can be obtained online at
  163. http://www.opengroup.org/unix/online.html .
  164. .PP
  165. Any typographical or formatting errors that appear
  166. in this page are most likely
  167. to have been introduced during the conversion of the source files to
  168. man page format. To report such errors, see
  169. https://www.kernel.org/doc/man-pages/reporting_bugs.html .