isposix

Un outil pour savoir si une commande est posix - retour accueil

git clone git://bebou.netlib.re/isposix
Log | Files | Refs | README |

mesg.html (10617B)


      1 <!-- Copyright 2001-2024 IEEE and The Open Group, All Rights Reserved -->
      2 <!DOCTYPE HTML>
      3 <html lang="en">
      4 <head>
      5 <meta name="generator" content="HTML Tidy for HTML5 for Linux version 5.8.0">
      6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      7 <link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group rhtm tool v1.2.4 -->
      8 <!-- Copyright (c) 2001-2024 The Open Group, All Rights Reserved -->
      9 <title>mesg</title>
     10 </head>
     11 <body bgcolor="white">
     12 <div class="NAVHEADER">
     13 <table summary="Header navigation table" class="nav" width="100%" border="0" cellpadding="0" cellspacing="0">
     14 <tr class="nav">
     15 <td class="nav" width="15%" align="left" valign="bottom"><a href="../utilities/man.html" accesskey="P">&lt;&lt;&lt;
     16 Previous</a></td>
     17 <td class="nav" width="70%" align="center" valign="bottom"><a href="contents.html">Home</a></td>
     18 <td class="nav" width="15%" align="right" valign="bottom"><a href="../utilities/mkdir.html" accesskey="N">Next
     19 &gt;&gt;&gt;</a></td>
     20 </tr>
     21 </table>
     22 <hr align="left" width="100%"></div>
     23 <script language="JavaScript" src="../jscript/codes.js"></script><basefont size="3">
     24 <center><font size="2">The Open Group Base Specifications Issue 8<br>
     25 IEEE Std 1003.1-2024<br>
     26 Copyright © 2001-2024 The IEEE and The Open Group</font></center>
     27 <hr size="2" noshade>
     28 <a name="top" id="top"></a> <a name="mesg" id="mesg"></a> <a name="tag_20_78" id="tag_20_78"></a><!-- mesg -->
     29 <h4 class="mansect"><a name="tag_20_78_01" id="tag_20_78_01"></a>NAME</h4>
     30 <blockquote>mesg — permit or deny messages</blockquote>
     31 <h4 class="mansect"><a name="tag_20_78_02" id="tag_20_78_02"></a>SYNOPSIS</h4>
     32 <blockquote class="synopsis">
     33 <p><code><tt>mesg</tt> <b>[</b><tt>y|n</tt><b>]</b></code></p>
     34 </blockquote>
     35 <h4 class="mansect"><a name="tag_20_78_03" id="tag_20_78_03"></a>DESCRIPTION</h4>
     36 <blockquote>
     37 <p>The <i>mesg</i> utility shall control whether other users are allowed to send messages via <a href=
     38 "../utilities/write.html"><i>write</i></a>, <a href="../utilities/talk.html"><i>talk</i></a>, or other utilities to a terminal
     39 device. The terminal device affected shall be determined by searching for the first terminal in the sequence of devices associated
     40 with standard input, standard output, and standard error, respectively. With no arguments, <i>mesg</i> shall report the current
     41 state without changing it. Processes with appropriate privileges may be able to send messages to the terminal independent of the
     42 current state.</p>
     43 </blockquote>
     44 <h4 class="mansect"><a name="tag_20_78_04" id="tag_20_78_04"></a>OPTIONS</h4>
     45 <blockquote>
     46 <p>None.</p>
     47 </blockquote>
     48 <h4 class="mansect"><a name="tag_20_78_05" id="tag_20_78_05"></a>OPERANDS</h4>
     49 <blockquote>
     50 <p>The following operands shall be supported in the POSIX locale:</p>
     51 <dl compact>
     52 <dd></dd>
     53 <dt><i>y</i></dt>
     54 <dd>Grant permission to other users to send messages to the terminal device.</dd>
     55 <dt><i>n</i></dt>
     56 <dd>Deny permission to other users to send messages to the terminal device.</dd>
     57 </dl>
     58 </blockquote>
     59 <h4 class="mansect"><a name="tag_20_78_06" id="tag_20_78_06"></a>STDIN</h4>
     60 <blockquote>
     61 <p>Not used.</p>
     62 </blockquote>
     63 <h4 class="mansect"><a name="tag_20_78_07" id="tag_20_78_07"></a>INPUT FILES</h4>
     64 <blockquote>
     65 <p>None.</p>
     66 </blockquote>
     67 <h4 class="mansect"><a name="tag_20_78_08" id="tag_20_78_08"></a>ENVIRONMENT VARIABLES</h4>
     68 <blockquote>
     69 <p>The following environment variables shall affect the execution of <i>mesg</i>:</p>
     70 <dl compact>
     71 <dd></dd>
     72 <dt><i>LANG</i></dt>
     73 <dd>Provide a default value for the internationalization variables that are unset or null. (See XBD <a href=
     74 "../basedefs/V1_chap08.html#tag_08_02"><i>8.2 Internationalization Variables</i></a> for the precedence of internationalization
     75 variables used to determine the values of locale categories.)</dd>
     76 <dt><i>LC_ALL</i></dt>
     77 <dd>If set to a non-empty string value, override the values of all the other internationalization variables.</dd>
     78 <dt><i>LC_CTYPE</i></dt>
     79 <dd>Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as
     80 opposed to multi-byte characters in arguments).</dd>
     81 <dt><i>LC_MESSAGES</i></dt>
     82 <dd><br>
     83 Determine the locale that should be used to affect the format and contents of diagnostic messages written (by <i>mesg</i>) to
     84 standard error.</dd>
     85 <dt><i>NLSPATH</i></dt>
     86 <dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
     87 Determine the location of messages objects and message catalogs. <img src="../images/opt-end.gif" alt="[Option End]" border=
     88 "0"></dd>
     89 </dl>
     90 </blockquote>
     91 <h4 class="mansect"><a name="tag_20_78_09" id="tag_20_78_09"></a>ASYNCHRONOUS EVENTS</h4>
     92 <blockquote>
     93 <p>Default.</p>
     94 </blockquote>
     95 <h4 class="mansect"><a name="tag_20_78_10" id="tag_20_78_10"></a>STDOUT</h4>
     96 <blockquote>
     97 <p>If no operand is specified, <i>mesg</i> shall display the current terminal state in an unspecified format.</p>
     98 </blockquote>
     99 <h4 class="mansect"><a name="tag_20_78_11" id="tag_20_78_11"></a>STDERR</h4>
    100 <blockquote>
    101 <p>The standard error shall be used only for diagnostic messages.</p>
    102 </blockquote>
    103 <h4 class="mansect"><a name="tag_20_78_12" id="tag_20_78_12"></a>OUTPUT FILES</h4>
    104 <blockquote>
    105 <p>None.</p>
    106 </blockquote>
    107 <h4 class="mansect"><a name="tag_20_78_13" id="tag_20_78_13"></a>EXTENDED DESCRIPTION</h4>
    108 <blockquote>
    109 <p>None.</p>
    110 </blockquote>
    111 <h4 class="mansect"><a name="tag_20_78_14" id="tag_20_78_14"></a>EXIT STATUS</h4>
    112 <blockquote>
    113 <p>The following exit values shall be returned:</p>
    114 <dl compact>
    115 <dd></dd>
    116 <dt>&nbsp;0</dt>
    117 <dd>Receiving messages is allowed.</dd>
    118 <dt>&nbsp;1</dt>
    119 <dd>Receiving messages is not allowed.</dd>
    120 <dt>&gt;1</dt>
    121 <dd>An error occurred.</dd>
    122 </dl>
    123 </blockquote>
    124 <h4 class="mansect"><a name="tag_20_78_15" id="tag_20_78_15"></a>CONSEQUENCES OF ERRORS</h4>
    125 <blockquote>
    126 <p>Default.</p>
    127 </blockquote>
    128 <hr>
    129 <div class="box"><em>The following sections are informative.</em></div>
    130 <h4 class="mansect"><a name="tag_20_78_16" id="tag_20_78_16"></a>APPLICATION USAGE</h4>
    131 <blockquote>
    132 <p>The mechanism by which the message status of the terminal is changed is unspecified. Therefore, unspecified actions may cause
    133 the status of the terminal to change after <i>mesg</i> has successfully completed. These actions may include, but are not limited
    134 to: another invocation of the <i>mesg</i> utility, login procedures; invocation of the <a href=
    135 "../utilities/stty.html"><i>stty</i></a> utility, invocation of the <a href="../utilities/chmod.html"><i>chmod</i></a> utility or
    136 <a href="../functions/chmod.html"><i>chmod</i>()</a> function, and so on.</p>
    137 </blockquote>
    138 <h4 class="mansect"><a name="tag_20_78_17" id="tag_20_78_17"></a>EXAMPLES</h4>
    139 <blockquote>
    140 <p>None.</p>
    141 </blockquote>
    142 <h4 class="mansect"><a name="tag_20_78_18" id="tag_20_78_18"></a>RATIONALE</h4>
    143 <blockquote>
    144 <p>The terminal changed by <i>mesg</i> is that associated with the standard input, output, or error, rather than the controlling
    145 terminal for the session. This is because users logged in more than once should be able to change any of their login terminals
    146 without having to stop the job running in those sessions. This is not a security problem involving the terminals of other users
    147 because appropriate privileges would be required to affect the terminal of another user.</p>
    148 <p>The method of checking each of the first three file descriptors in sequence until a terminal is found was adopted from System
    149 V.</p>
    150 <p>The file <b>/dev/tty</b> is not specified for the terminal device because it was thought to be too restrictive. Typical
    151 environment changes for the <i>n</i> operand are that write permissions are removed for <i>others</i> and <i>group</i> from the
    152 appropriate device. It was decided to leave the actual description of what is done as unspecified because of potential differences
    153 between implementations.</p>
    154 <p>The format for standard output is unspecified because of differences between historical implementations. This output is
    155 generally not useful to shell scripts (they can use the exit status), so exact parsing of the output is unnecessary.</p>
    156 </blockquote>
    157 <h4 class="mansect"><a name="tag_20_78_19" id="tag_20_78_19"></a>FUTURE DIRECTIONS</h4>
    158 <blockquote>
    159 <p>None.</p>
    160 </blockquote>
    161 <h4 class="mansect"><a name="tag_20_78_20" id="tag_20_78_20"></a>SEE ALSO</h4>
    162 <blockquote>
    163 <p><a href="../utilities/talk.html#"><i>talk</i></a> , <a href="../utilities/write.html#tag_20_151"><i>write</i></a></p>
    164 <p>XBD <a href="../basedefs/V1_chap08.html#tag_08"><i>8. Environment Variables</i></a></p>
    165 </blockquote>
    166 <h4 class="mansect"><a name="tag_20_78_21" id="tag_20_78_21"></a>CHANGE HISTORY</h4>
    167 <blockquote>
    168 <p>First released in Issue 2.</p>
    169 </blockquote>
    170 <h4 class="mansect"><a name="tag_20_78_22" id="tag_20_78_22"></a>Issue 6</h4>
    171 <blockquote>
    172 <p>This utility is marked as part of the User Portability Utilities option.</p>
    173 </blockquote>
    174 <h4 class="mansect"><a name="tag_20_78_23" id="tag_20_78_23"></a>Issue 7</h4>
    175 <blockquote>
    176 <p>The <i>mesg</i> utility is moved from the User Portability Utilities option to the Base. User Portability Utilities is now an
    177 option for interactive utilities.</p>
    178 </blockquote>
    179 <h4 class="mansect"><a name="tag_20_78_24" id="tag_20_78_24"></a>Issue 8</h4>
    180 <blockquote>
    181 <p>Austin Group Defect 1122 is applied, changing the description of <i>NLSPATH .</i></p>
    182 </blockquote>
    183 <div class="box"><em>End of informative text.</em></div>
    184 <hr>
    185 <p>&nbsp;</p>
    186 <a href="#top"><span class="topOfPage">return to top of page</span></a><br>
    187 <hr size="2" noshade>
    188 <center><font size="2">UNIX® is a registered Trademark of The Open Group.<br>
    189 POSIX™ is a Trademark of The IEEE.<br>
    190 Copyright © 2001-2024 The IEEE and The Open Group, All Rights Reserved<br>
    191 [ <a href="../mindex.html">Main Index</a> | <a href="../basedefs/contents.html">XBD</a> | <a href=
    192 "../functions/contents.html">XSH</a> | <a href="../utilities/contents.html">XCU</a> | <a href="../xrat/contents.html">XRAT</a>
    193 ]</font></center>
    194 <hr size="2" noshade>
    195 <div class="NAVHEADER">
    196 <table summary="Header navigation table" class="nav" width="100%" border="0" cellpadding="0" cellspacing="0">
    197 <tr class="nav">
    198 <td class="nav" width="15%" align="left" valign="bottom"><a href="../utilities/man.html" accesskey="P">&lt;&lt;&lt;
    199 Previous</a></td>
    200 <td class="nav" width="70%" align="center" valign="bottom"><a href="contents.html">Home</a></td>
    201 <td class="nav" width="15%" align="right" valign="bottom"><a href="../utilities/mkdir.html" accesskey="N">Next
    202 &gt;&gt;&gt;</a></td>
    203 </tr>
    204 </table>
    205 <hr align="left" width="100%"></div>
    206 </body>
    207 </html>