A NOTE has been added to this issue. ====================================================================== https://austingroupbugs.net/view.php?id=1746 ====================================================================== Reported By: geoffclare Assigned To: ====================================================================== Project: 1003.1(2016/18)/Issue7+TC2 Issue ID: 1746 Category: Shell and Utilities Type: Clarification Requested Severity: Objection Priority: normal Status: New Name: Geoff Clare Organization: The Open Group User Reference: Section: fuser Page Number: 2817 Line Number: 92698 Interp Status: --- Final Accepted Text: ====================================================================== Date Submitted: 2023-06-13 15:58 UTC Last Modified: 2023-06-20 15:56 UTC ====================================================================== Summary: fuser output format clarification ======================================================================
---------------------------------------------------------------------- (0006341) geoffclare (manager) - 2023-06-20 15:56 https://austingroupbugs.net/view.php?id=1746#c6341 ---------------------------------------------------------------------- New proposal that (I hope) addresses all the points raised so far... On page 2816 line 92653 section fuser (NAME), change:<blockquote>list process IDs of all processes that have one or more files open</blockquote>to:<blockquote>list process IDs of all processes that are using one or more named files</blockquote> On page 2816 line 92657 section fuser (DESCRIPTION), change:<blockquote>The <i>fuser</i> utility shall write to standard output the process IDs of processes running on the local system that have one or more named files open. For block special devices, all processes using any file on that device are listed. The <i>fuser</i> utility shall write to standard error additional information about the named files indicating how the file is being used. Any output for processes running on remote systems that have a named file open is unspecified. A user may need appropriate privileges to invoke the <i>fuser</i> utility.</blockquote>to:<blockquote>For each <i>file</i> operand, in order, <i>fuser</i> shall write one line of output, some of it to standard output, and the rest to standard error, giving information about processes running on the local system that are using the file. A process shall be considered to be using a file if it has at least one open file descriptor associated with the file or if the file is a directory that is the current working directory or the root directory for the process, and may be considered to be using a file for other implementation-dependent reasons. If <i>file</i> names a block special device that contains a mounted file system, and the <b>-f</b> option is not specified, any processes using any file on that mounted file system and any processes that are using the device file itself shall be listed. Any output for processes running on remote systems that are using a named file is unspecified. A user may need appropriate privileges to invoke the <i>fuser</i> utility. When standard output and standard error are directed to the same file, the output for each <i>file</i> operand shall be interleaved so that it is written to the file in the following order: <ul><li>On standard error, a pathname for the file, immediately followed by a <colon> and zero or more <blank> characters. The pathname shall be either the <i>file</i> operand (unaltered) or the pathname that would result from a successful call to the <i>realpath</i>() function, defined in System Interfaces volume of POSIX.1-202x, with the <i>file</i> operand as its <i>file_name</i> argument.</li> <li>For each process using the file:<blockquote><ul><li>On standard output, the process ID in the format:<pre>" %1d", <<i>process ID</i>></pre></li> <li>On standard error, information about the file's use by the process, in the following format:<pre>"%s", <<i>use chars</i>></pre>if the <b>-u</b> option is not specified, or in the following format:<pre>"%s(%s)", <<i>use chars</i>>, <<i>user name</i>></pre>if the <b>-u</b> option is specified, where <<i>use chars</i>> is a string of zero or more characters indicating the use of the file and <<i>user name</i>> is the user name corresponding to the real user ID of the process or, if the user name cannot be resolved from the real user ID of the process, the real user ID of the process in decimal. The value of <<i>use chars</i>> shall include the character 'c' if the process is using the file as its current directory and the character 'r' if the process is using the file as its root directory; implementations may include other alphabetic characters to indicate other uses of the file.</li> </ul></blockquote></li> <li>On standard error, a <newline> character.</li> </ul> When standard output and standard error are not directed to the same file, the data written to each shall be as described above but the ordering of writes to standard output relative to writes to standard error is unspecified. For example, <i>fuser</i> might first write the information for all <i>file</i> operands to standard error and then write all of the process IDs to standard output.</blockquote> On page 2816 line 92667 section fuser (OPTIONS, -c), change:<blockquote>The file is treated as a mount point and the utility shall report on any files open in the file system.</blockquote>to:<blockquote>If a <i>file</i> operand names a directory that is the mount point of a mounted file system, all processes using any file on that file system shall be listed as if they were using the named directory. The behavior for any <i>file</i> operand that names an existing file that is not the mount point of a mounted file system is unspecified.</blockquote> On page 2816 line 92674 section fuser (OPERANDS), change:<blockquote>A pathname on which the file or file system is to be reported.</blockquote>to:<blockquote>A pathname of a file for which the processes using the file are to be reported.</blockquote> On page 2817 line 92696-92698 section fuser, replace the STDOUT section with:<blockquote>See DESCRIPTION.</blockquote> On page 2817 line 92700-92716 section fuser, replace the STDERR section with:<blockquote>The <i>fuser</i> utility shall write diagnostic messages to standard error. The <i>fuser</i> utility also shall write information to standard error as specified in the DESCRIPTION section.</blockquote> On page 2818 line 92728 section fuser, change APPLICATION USAGE from "None" to:<blockquote>Things can change while <i>fuser</i> is running; the snapshot it gives is only true for an instant, and might not be accurate by the time it is displayed.</blockquote> On page 2818 line 92743 section fuser (EXAMPLES), change:<blockquote><pre>fuser <<i>block device</i>></pre>writes to standard output the process IDs of processes that are using any file which is on the device named by <<i>block device</i>> and writes to standard error an indication of how those processes are using the file. <pre>fuser -f <<i>block device</i>></pre>writes to standard output the process IDs of processes that are using the file <<i>block device</i>> itself and writes to standard error an indication of how those processes are using the file.</blockquote>to:<blockquote><pre>fuser <<i>mounted block device</i>></pre>writes to standard output the process IDs of processes that are using any file on the mounted file system contained by <<i>mounted block device</i>> and of processes that are using the device file <<i>mounted block device</i>> itself, and writes to standard error an indication of how those processes are using the files. <pre>fuser -f <<i>mounted block device</i>></pre>writes to standard output the process IDs of processes that are using the device file <<i>mounted block device</i>> itself and writes to standard error an indication of how those processes are using the file.</blockquote> Issue History Date Modified Username Field Change ====================================================================== 2023-06-13 15:58 geoffclare New Issue 2023-06-13 15:58 geoffclare Name => Geoff Clare 2023-06-13 15:58 geoffclare Organization => The Open Group 2023-06-13 15:58 geoffclare Section => fuser 2023-06-13 15:58 geoffclare Page Number => 2817 2023-06-13 15:58 geoffclare Line Number => 92698 2023-06-13 15:58 geoffclare Interp Status => --- 2023-06-13 20:20 kre Note Added: 0006330 2023-06-13 20:44 kre Note Added: 0006331 2023-06-15 09:35 geoffclare Note Added: 0006332 2023-06-15 13:58 kre Note Added: 0006334 2023-06-15 14:36 kre Note Added: 0006335 2023-06-20 15:56 geoffclare Note Added: 0006341 ======================================================================