Package: lsof Version: 4.95.0-1.1 Severity: minor Tags: patch * What led up to the situation?
Checking for defects with [test-][gn]roff -mandoc -t -K utf8 -rF0 -rHY=0 -ww -b -z < "man page" [test-groff is a script in the repository for "groff"] (local copy and "troff" slightly changed by me). * What was the outcome of this action? troff: backtrace: file 'stdin':708 troff:stdin:708: warning: macro '..``' not defined troff: backtrace: file 'stdin':953 troff:stdin:953: warning: trailing space in the line * What outcome did you expect instead? No output (no warnings). -.- General remarks and further material, if a diff-file exist, are in the attachments. -- System Information: Debian Release: trixie/sid APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 6.10.11-amd64 (SMP w/2 CPU threads; PREEMPT) Locale: LANG=is_IS.iso88591, LC_CTYPE=is_IS.iso88591 (charmap=ISO-8859-1), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: sysvinit (via /sbin/init) Versions of packages lsof depends on: ii libc6 2.40-2 ii libselinux1 3.7-3 ii libtirpc3t64 1.3.4+ds-1.3 lsof recommends no packages. lsof suggests no packages. -- no debconf information
Any program (person), that produces man pages, should check the output for defects by using (both groff and nroff) [gn]roff -mandoc -t -ww -b -z -K utf8 <man page> The same goes for man pages that are used as an input. For a style guide use mandoc -T lint -.- So any 'generator' should check its products with the above mentioned 'groff', 'mandoc', and additionally with 'nroff ...'. This is just a simple quality control measure. The 'generator' may have to be corrected to get a better man page, the source file may, and any additional file may. Common defects: Input text line longer than 80 bytes. Not removing trailing spaces (in in- and output). The reason for these trailing spaces should be found and eliminated. Not beginning each input sentence on a new line. Lines should thus be shorter. See man-pages(7), item 'semantic newline'. -.- The difference between the formatted outputs can be seen with: nroff -mandoc <file1> > <out1> nroff -mandoc <file2> > <out2> diff -u <out1> <out2> and for groff, using "printf '%s\n%s\n' '.kern 0' '.ss 12 0' | groff -mandoc -Z - " instead of \'nroff -mandoc\' Add the option \'-t\', if the file contains a table. Read the output of \'diff -u\' with \'less -R\' or similar. -.-. If \'man\' (man-db) is used to check the manual for warnings, the following must be set: The option "-warnings=w" The environmental variable: export MAN_KEEP_STDERR=yes (or any non-empty value) or (produce only warnings): export MANROFFOPT="-ww -b -z" export MAN_KEEP_STDERR=yes (or any non-empty value) -.-. Output from "mandoc -T lint lsof.8": (possibly shortened list) mandoc: lsof.8:656:118: STYLE: input text line longer than 80 bytes: specifies that Linux... mandoc: lsof.8:658:102: STYLE: input text line longer than 80 bytes: should be displayed ... mandoc: lsof.8:666:83: STYLE: input text line longer than 80 bytes: Note 2: POSIX Messag... mandoc: lsof.8:693:89: STYLE: input text line longer than 80 bytes: output contains HASP... mandoc: lsof.8:716:2: ERROR: skipping unknown macro: ...`` \-> \fIPID,cmd,FDmode\fP'' ..., where mandoc: lsof.8:979:5: ERROR: skipping all arguments: br or \fBUDPLITE\fP. mandoc: lsof.8:980:2: WARNING: skipping paragraph macro: br after br mandoc: lsof.8:3526:2: WARNING: skipping paragraph macro: PP after SH mandoc: lsof.8:3597:2: WARNING: skipping paragraph macro: PP after SH mandoc: lsof.8:3695:2: WARNING: skipping paragraph macro: PP empty mandoc: lsof.8:3702:2: WARNING: skipping paragraph macro: PP after SH mandoc: lsof.8:3774:2: WARNING: skipping paragraph macro: PP after SH mandoc: lsof.8:3869:2: WARNING: skipping paragraph macro: PP after SH mandoc: lsof.8:3942:2: WARNING: skipping paragraph macro: PP after SH mandoc: lsof.8:4036:2: WARNING: skipping paragraph macro: PP after SH mandoc: lsof.8:4062:2: WARNING: skipping paragraph macro: PP after SH mandoc: lsof.8:4094:2: WARNING: skipping paragraph macro: PP after SH mandoc: lsof.8:4163:2: WARNING: skipping paragraph macro: PP after SH mandoc: lsof.8:4242:2: WARNING: skipping paragraph macro: PP empty mandoc: lsof.8:4572:2: WARNING: skipping paragraph macro: PP after SH -.-. Change '-' (\-) to '\(en' (en-dash) for a numeric range. GNU gnulib has recently (2023-06-18) updated its "build_aux/update-copyright" to recognize "\(en" in man pages. lsof.8:424:member is larger than the starting one \- e.g., ``0\-7'' or ``3\-10''. lsof.8:426:e.g., ``^0\-7'' excludes all file descriptors 0 through 7. lsof.8:1086: tcp@foo:1\-10,smtp,99 \- TCP, ports 1 through 10, lsof.8:3387: 1\-9 dialect\-specific field identifiers (The output lsof.8:3920: OpenBSD 2.[89] and 3.[0\-9] for based systems lsof.8:4319:lsof \-i @wonderland.cc.purdue.edu:513\-515 -.-. Change two HYPHEN-MINUSES (code 0x2D) to an em-dash (\(em), if one is intended. An en-dash is usually surrounded by a space, while an em-dash is used without spaces. "man" (1 byte characters in input) transforms an en-dash (\(en) to one HYPHEN-MINUS, and an em-dash to two HYPHEN-MINUSES without considering the space around it. If "--" are two single "-" (end of options) then use "\-\-". lsof.8:201:Options may be grouped together following a single prefix -- e.g., lsof.8:1697:the name -- e.g., ``SO=LINGER=5'', ``SO=QLIM=5'', ``TF=MSS=512''. lsof.8:2110:The case requires that the absolute path -- i.e., one beginning with a lsof.8:2640:or ``NOFD'' for a Linux /proc/<PID>/fd directory that can't be opened -- -.-. Use the correct macro for the font change of a single argument or split the argument into two. 1310:.BI \-o -.-. Add a backslash, if it is missing after \{ at the end of a line. 956:.ie !\n(.g \{ 959:.el \{ -.-. Use "\e" to print the escape character instead of "\\" (which gets interpreted in copy mode). 2354:the C ``\\[bfrnt]'' form; 2356:or hexadecimal leading ``\\x'' form (e.g., ``\\xab''). 2357:Space is non\-printable in the COMMAND column (``\\x20'') -.-. Change a HYPHEN-MINUS (code 0x2D) to a minus(-dash) (\-), if it is in front of a name for an option, is a symbol for standard input, is a single character used to indicate an option, or is in the NAME section (man-pages(7)). N.B. - (0x2D), processed as a UTF-8 file, is changed to a hyphen (0x2010, groff \[u2010] or \[hy]) in the output. 201:Options may be grouped together following a single prefix -- e.g., 1598:displays whatever value - size or offset - is appropriate and 1601:Since some types of files don't have true sizes - sockets, FIFOs, 1602:pipes, etc.\& - lsof displays for their sizes the content amounts in 1697:the name -- e.g., ``SO=LINGER=5'', ``SO=QLIM=5'', ``TF=MSS=512''. 2110:The case requires that the absolute path -- i.e., one beginning with a 2360:For some dialects - if HASSETLOCALE is defined in the dialect's 2361:machine.h header file - 2377:be used in place of LANG - e.g., LC_ALL, LC_CTYPE, etc. 2380:language locale support for a dialect also covers wide characters - e.g., 2381:UTF-8 - when HASSETLOCALE and HASWIDECHAR are defined in the dialect's 2640:or ``NOFD'' for a Linux /proc/<PID>/fd directory that can't be opened -- 2970: OPIP open pending - in progress -.-. Find a repeated word ! 970 --> be ! 2126 --> is -.-. Strings longer than 3/4 of a standard line length (80) Use "\:" to split the string at the end of an output line, for example a long URLs (web address) 957 [\fI46\fP][\fIprotocol\fP][@\fIhostname\fP\||\|\fIhostaddr\fP][:\fIservice\fP\||\|\fIport\fP] -.-. Wrong distance between sentences in the input file. Separate the sentences and subordinate clauses; each begins on a new line. See man-pages(7) ("Conventions for source file layout") and "info groff" ("Input Conventions"). The best procedure is to always start a new sentence on a new line, at least, if you are typing on a computer. Remember coding: Only one command ("sentence") on each (logical) line. E-mail: Easier to quote exactly the relevant lines. Generally: Easier to edit the sentence. Patches: Less unaffected text. Search for two adjacent words is easier, when they belong to the same line, and the same phrase. The amount of space between sentences in the output can then be controlled with the ".ss" request. 693:output contains HASPTYEPT. In addition, this feature works on Linux kernels above 4.13.0. 720:are the same as with pipe endpoint information. The endpoint 728:the same form as that of pipe. This feature works on Linux kernels 1416:ignore failed search terms. When 1422:will return an error if any of the search results are empty. The 1427:search results are empty. In addition, missing search terms will not 1726:header), so that it is easy to use programmatically. e.g. 2398:lsof FAQ (The \fBFAQ\fP section gives its location.) for more information. 3312:the file descriptor (`f') field. However, 3314:in this version doesn't produce it. This change is for supporting 3316:need the file descriptor field. Specify `f' explicitly if you 3380: UNIX dialects. The \fB\-h\fP or \fB\-?\fP help output for the -.-. Split lines longer than 80 characters into two or more lines. Appropriate break points are the end of a sentence and a subordinate clause; after punctuation marks. N.B. The number of lines affected can be too large to be in a patch. Line 656, length 118 specifies that Linux pipe, Linux UNIX socket, Linux INET(6) socket closed in a local host, Linux pseudoterminal files, Line 658, length 102 should be displayed with endpoint information and the files of the endpoints should also be displayed. Line 666, length 83 Note 2: POSIX Message Queue file endpoint information is only available when mqueue Line 693, length 89 output contains HASPTYEPT. In addition, this feature works on Linux kernels above 4.13.0. Line 957, length 93 [\fI46\fP][\fIprotocol\fP][@\fIhostname\fP\||\|\fIhostaddr\fP][:\fIservice\fP\||\|\fIport\fP] Line 3361, length 85 o file's offset (0t<decimal> or 0x<hexadecimal>, see \fB\-o\fP \fIo\fP) -.-. Use \(en (en-dash) for a dash between space characters, not a minus (\-) or a hyphen (-), except in the NAME section. lsof.8:1598:displays whatever value - size or offset - is appropriate and lsof.8:1601:Since some types of files don't have true sizes - sockets, FIFOs, lsof.8:1602:pipes, etc.\& - lsof displays for their sizes the content amounts in lsof.8:1611:\- that might otherwise deadlock. lsof.8:1972:\- are not recorded in the cached path, what lsof.8:2360:For some dialects - if HASSETLOCALE is defined in the dialect's lsof.8:2377:be used in place of LANG - e.g., LC_ALL, LC_CTYPE, etc. lsof.8:2380:language locale support for a dialect also covers wide characters - e.g., lsof.8:2381:UTF-8 - when HASSETLOCALE and HASWIDECHAR are defined in the dialect's lsof.8:2970: OPIP open pending - in progress -.-. Split a punctuation mark from a single argument for a two-font macro 1030:.BR 4, 1031:.BR 6, 1900:.BR \-X, -.-. The section part for a manual page is set in roman font. 3423:.I xargs (1), -.-. Name of a manual is set in bold, the section in roman. See man-pages(7). 621:.IR stat(2) -.-. End of a block is marked with a "\}" without a period in front of it. That creates a space character, which forces "groff" to waste processing time to remove. 958:\} 961:\} -.-. Output from "test-groff -mandoc -t -K utf8 -rF0 -rHY=0 -ww -b -z ": troff: backtrace: file 'stdin':708 troff:stdin:708: warning: macro '..``' not defined troff: backtrace: file 'stdin':953 troff:stdin:953: warning: trailing space in the line -.-. Add a '.' in front of '\}' if it starts a line. -.- Additionally (general): Abbreviations get a '\&' added after their final full stop (.) to mark them as such and not as an end of sentence. There is no need to add a '\&' before a full stop (.) if it has a character before it!
--- lsof.8 2024-09-30 23:22:47.145490690 +0000 +++ lsof.8.new 2024-10-01 00:32:14.397726575 +0000 @@ -198,7 +198,7 @@ and \fB\-u\fPfff,ggg will select the lis either login ``fff'' OR ``ggg'' AND have network connections to either host aaa.bbb OR ccc.ddd. .PP -Options may be grouped together following a single prefix -- e.g., +Options may be grouped together following a single prefix \(en e.g., the option set ``\fB\-a \-b \-C\fP'' may be stated as .BR \-abC . However, since values are optional following @@ -421,9 +421,9 @@ Mixed lists are not permitted. .IP A file descriptor number range may be in the set as long as neither member is empty, both members are numbers, and the ending -member is larger than the starting one \- e.g., ``0\-7'' or ``3\-10''. -Ranges may be specified for exclusion if they have the `^' prefix \- -e.g., ``^0\-7'' excludes all file descriptors 0 through 7. +member is larger than the starting one \(en e.g., ``0\(en7'' or ``3\(en10''. +Ranges may be specified for exclusion if they have the `^' prefix \(en +e.g., ``^0\(en7'' excludes all file descriptors 0 through 7. .IP Multiple file descriptor numbers are joined in a single ORed set before participating in AND option selection. @@ -618,7 +618,7 @@ kernel function calls. The .B \-e option exempts only -.IR stat(2) +.IR stat (2) and .IR lstat (2) kernel function calls. @@ -653,9 +653,11 @@ option.) .TP \w'names'u+4 .B +|\-E .B +E -specifies that Linux pipe, Linux UNIX socket, Linux INET(6) socket closed in a local host, Linux pseudoterminal files, +specifies that Linux pipe, Linux UNIX socket, +Linux INET(6) socket closed in a local host, Linux pseudoterminal files, POSIX Message Queueue implementation in Linux, and Linux eventfd -should be displayed with endpoint information and the files of the endpoints should also be displayed. +should be displayed with endpoint information and +the files of the endpoints should also be displayed. .IP Note 1: UNIX socket file endpoint information is only available when the compile flags line of @@ -663,8 +665,8 @@ compile flags line of output contains HASUXSOCKEPT, and psudoterminal endpoint information is only available when the compile flags line contains HASPTYEPT. .IP -Note 2: POSIX Message Queue file endpoint information is only available when mqueue -file system is mounted. +Note 2: POSIX Message Queue file endpoint information is only available when +mqueue file system is mounted. .IP Pipe endpoint information is displayed in the NAME column in the form ``\fIPID,cmd,FDmode\fP'', where @@ -690,7 +692,8 @@ are the same as with pipe endpoint infor Note: psudoterminal endpoint information is only available when the compile flags line of .B \-V -output contains HASPTYEPT. In addition, this feature works on Linux kernels above 4.13.0. +output contains HASPTYEPT. +In addition, this feature works on Linux kernels above 4.13.0. .IP UNIX socket file endpoint information is displayed in the NAME column in the form @@ -711,22 +714,23 @@ compile flags line of output contains HASUXSOCKEPT. .IP INET socket file endpoint information is inserted to the value at the -NAME column in th form +NAME column in the form .br -...`` \-> \fIPID,cmd,FDmode\fP'' ..., where +\&...`` \-> \fIPID,cmd,FDmode\fP'' ..., where .I "PID, cmd, FD" and .I mode -are the same as with pipe endpoint information. The endpoint -information is available only if the socket is used for local -IPC; both endpoints bind to the same local IPv4 or IPv6 address. +are the same as with pipe endpoint information. +The endpoint information is available only +if the socket is used for local IPC; +both endpoints bind to the same local IPv4 or IPv6 address. .IP POSIX Message Queue file endpoint information is displayed in the NAME column in the same form as that of pipe. .IP eventfd endpoint information is displayed in the NAME column in -the same form as that of pipe. This feature works on Linux kernels -above 5.2.0. +the same form as that of pipe. +This feature works on Linux kernels above 5.2.0. .IP Multiple occurrences of this information can appear in a file's NAME column. @@ -953,12 +957,13 @@ AND option selection. An Internet address is specified in the form (Items in square brackets are optional.): .IP -.ie !\n(.g \{ -[\fI46\fP][\fIprotocol\fP][@\fIhostname\fP\||\|\fIhostaddr\fP][:\fIservice\fP\||\|\fIport\fP] -\} -.el \{ +.ie !\n(.g \{\ +[\fI46\fP][\fIprotocol\fP][@\fIhostname\fP\||\|\fIhostaddr\fP]\ +\:[:\fIservice\fP\||\|\fIport\fP] +.\} +.el \{\ .RI [ 46 ][ protocol ][@ hostname \||\| hostaddr ][: service \||\| port ] -\} +.\} .IP where: .nf @@ -967,7 +972,7 @@ where: .br that applies to the following address. .br - '6' may be be specified only if the UNIX + '6' may be specified only if the UNIX .br dialect supports IPv6. If neither '4' nor .br @@ -976,7 +981,7 @@ where: applies to all IP versions. .br \fIprotocol\fP is a protocol name \- \fBTCP\fP, \fBUDP\fP -.br or \fBUDPLITE\fP. + or \fBUDPLITE\fP. .br \fIhostname\fP is an Internet host name. Unless a .br @@ -1027,8 +1032,8 @@ the open file's type will be IPv6, not I selected by '6', not '4'. .IP At least one address component \- -.BR 4, -.BR 6, +.BR 4 , +.BR 6 , .IR protocol , .IR hostname , .IR hostaddr , @@ -1083,7 +1088,7 @@ Here are some sample addresses: .br t...@lsof.itap:513 \- TCP, port 513 and host name lsof.itap .br - tcp@foo:1\-10,smtp,99 \- TCP, ports 1 through 10, + tcp@foo:1\(en10,smtp,99 \- TCP, ports 1 through 10, service name \fIsmtp\fP, port 99, host name foo .br tcp@bar:1\-smtp \- TCP, ports 1 through \fIsmtp\fP, host bar @@ -1307,7 +1312,7 @@ It is also useful when host name lookup .B \-N selects the listing of NFS files. .TP \w'names'u+4 -.BI \-o +.B \-o directs .I lsof to display file offset at all times. @@ -1413,19 +1418,21 @@ run a little faster. It is also useful when port name lookup is not working properly. .TP \w'names'u+4 .B \-Q -ignore failed search terms. When +ignore failed search terms. +When .I lsof is told to search for users of a file, or for users of a device, or for a specific PID, or for certain protocols in use by that PID, and so on, .I lsof -will return an error if any of the search results are empty. The +will return an error if any of the search results are empty. +The .B \-Q option will change this behavior so that .I lsof will instead return a successful exit code (0) even if any of the -search results are empty. In addition, missing search terms will not -be reported to stderr. +search results are empty. +In addition, missing search terms will not be reported to stderr. .TP \w'names'u+4 .BI +|\-r " [t[c<N>][m<fmt>]]" puts @@ -1595,11 +1602,11 @@ option (without a following protocol and are mutually exclusive; they can't both be specified. When neither is specified, .I lsof -displays whatever value - size or offset - is appropriate and +displays whatever value \(en size or offset \(en is appropriate and available for the type of file. .IP -Since some types of files don't have true sizes - sockets, FIFOs, -pipes, etc.\& - lsof displays for their sizes the content amounts in +Since some types of files don't have true sizes \(en sockets, FIFOs, +pipes, etc.\& \(en lsof displays for their sizes the content amounts in their associated kernel buffers, if possible. .TP \w'names'u+4 .BI \-S " [t]" @@ -1608,7 +1615,7 @@ specifies an optional time-out seconds v .IR readlink (2), and .IR stat (2) -\- that might otherwise deadlock. +\(en that might otherwise deadlock. The minimum for .I t is two; @@ -1694,7 +1701,7 @@ states and values. and ``TF='', TCP flags and values. .IP If a flag or option has a value, the value will follow an '=' and -the name -- e.g., ``SO=LINGER=5'', ``SO=QLIM=5'', ``TF=MSS=512''. +the name \(en e.g., ``SO=LINGER=5'', ``SO=QLIM=5'', ``TF=MSS=512''. The following seven values may be reported: .IP .nf @@ -1723,7 +1730,7 @@ On Linux this option also prints the sta .TP \w'names'u+4 .B \-t produce terse output comprising only process identifiers (without a -header), so that it is easy to use programmatically. e.g. +header), so that it is easy to use programmatically. e.g.\& .nf # reload anything using old SSL @@ -1897,7 +1904,7 @@ process is root. The default .I lsof distribution allows any UID to specify -.BR \-X, +.BR \-X , so by default it will appear in the help output. .IP When AIX readx() use @@ -1969,7 +1976,7 @@ Because intervening changes made to the .IR mv (1) or .IR rename (2) -\- are not recorded in the cached path, what +\(en are not recorded in the cached path, what .I lsof reports is only the path by which the file was opened, not its possibly different final path. @@ -2093,9 +2100,9 @@ it is specified and is recorded in the k Specifying a relative path \- e.g., .I ./file \&\- in place of the -file's absolute path \- e.g., +file's absolute path \(en e.g., .I /tmp/file -\&\- won't work because +\&\(en won't work because .I lsof must match the characters you specify with what it finds in the kernel UNIX domain socket structures. @@ -2107,7 +2114,7 @@ is a Linux UNIX domain socket name, in o is able to search for it by its device and inode number, allowing .I name to be a relative path. -The case requires that the absolute path -- i.e., one beginning with a +The case requires that the absolute path \(en i.e., one beginning with a slash ('/') be used by the process that created the socket, and hence be stored in the .I /proc/net/unix @@ -2122,7 +2129,7 @@ via successful system calls. When those conditions are met, .I lsof -will be able to search for the UNIX domain socket when some path to it is +will be able to search for the UNIX domain socket when some path to it is specified in .IR name . Thus, for example, if the path is @@ -2351,14 +2358,14 @@ only outputs printable (declared so by .IR isprint (3)) 8 bit characters. Non\-printable characters are printed in one of three forms: -the C ``\\[bfrnt]'' form; +the C ``\e[bfrnt]'' form; the control character `^' form (e.g., ``^@''); -or hexadecimal leading ``\\x'' form (e.g., ``\\xab''). -Space is non\-printable in the COMMAND column (``\\x20'') +or hexadecimal leading ``\ex'' form (e.g., ``\exab''). +Space is non\-printable in the COMMAND column (``\ex20'') and printable elsewhere. .PP -For some dialects - if HASSETLOCALE is defined in the dialect's -machine.h header file - +For some dialects \(en if HASSETLOCALE is defined in the dialect's +machine.h header file \(en .I lsof will print the extended 8 bit characters of a language locale. The @@ -2374,11 +2381,11 @@ to its rules for non-printable character Consult your dialect's .IR setlocale (3) man page for the names of other environment variables that may -be used in place of LANG - e.g., LC_ALL, LC_CTYPE, etc. +be used in place of LANG \(en e.g., LC_ALL, LC_CTYPE, etc. .PP .I Lsof's -language locale support for a dialect also covers wide characters - e.g., -UTF-8 - when HASSETLOCALE and HASWIDECHAR are defined in the dialect's +language locale support for a dialect also covers wide characters \(en e.g., +UTF-8 \(en when HASSETLOCALE and HASWIDECHAR are defined in the dialect's machine.h header file, and when a suitable language locale has been defined in the appropriate environment variable for the .I lsof @@ -2395,7 +2402,9 @@ considers the wide characters non\-print 8 bits according to its rules for non\-printable characters, stated above. .PP Consult the answers to the "Language locale support" questions in the -lsof FAQ (The \fBFAQ\fP section gives its location.) for more information. +lsof FAQ +(The \fBFAQ\fP section gives its location.) +for more information. .PP .I Lsof dynamically sizes the output columns each time it runs, guaranteeing @@ -2637,7 +2646,7 @@ or ``MPB'' for a multiplexed block file; .IP or ``MPC'' for a multiplexed character file; .IP -or ``NOFD'' for a Linux /proc/<PID>/fd directory that can't be opened -- +or ``NOFD'' for a Linux /proc/<PID>/fd directory that can't be opened \(en \ the directory path appears in the NAME column, followed by an error message; .IP @@ -2967,7 +2976,7 @@ for kernel per-process open file flags f CX close-on-exec (see fcntl(F_SETFD)) LCK lock was applied MP memory-mapped - OPIP open pending - in progress + OPIP open pending \(en in progress RSVW reserved wait SHMT UF_FSHMAT set (AIX) USE in use (multi-threaded) @@ -3309,12 +3318,14 @@ also selects the listing of the item. .PP .I Lsof version from 4.88 to 4.93.2 always produced one more field, -the file descriptor (`f') field. However, +the file descriptor (`f') field. +However, .I lsof -in this version doesn't produce it. This change is for supporting -the use case that a user needs only the PID field, and doesn't -need the file descriptor field. Specify `f' explicitly if you -need the field. +in this version doesn't produce it. +This change is for supporting +the use case that a user needs only the PID field, +and doesn't need the file descriptor field. +Specify `f' explicitly if you need the field. .PP It is entirely possible to select a set of fields that cannot easily be parsed \- e.g., if the field descriptor field is not @@ -3377,14 +3388,14 @@ The single character listed first is the WR=<window read size> (not all dialects) WW=<window write size> (not all dialects) (TCP/TPI information isn't reported for all supported - UNIX dialects. The \fB\-h\fP or \fB\-?\fP help output for the + UNIX dialects. The \fB\-h\fP or \fB\-?\fP help output for the \fB\-T\fP option will show what TCP/TPI reporting can be requested.) u process user ID z Solaris 10 and higher zone name Z SELinux security context (inhibited when SELinux is disabled) 0 use NUL field terminator character in place of NL - 1\-9 dialect\-specific field identifiers (The output + 1\(en9 dialect\-specific field identifiers (The output of \fB\-F?\fP identifies the information to be found in dialect\-specific fields.) .fi @@ -3420,7 +3431,7 @@ The field terminator character to a NUL (000). A NUL terminator may be easier to process with -.I xargs (1), +.IR xargs (1), for example, or with programs whose quoting mechanisms may not easily cope with the range of characters in the field output. When the NUL field terminator is in use, @@ -3523,7 +3534,6 @@ to start up with less overhead, it expos completely to the kernel situations that might block it. Use this option cautiously. .SH "AVOIDING KERNEL BLOCKS" -.PP You can use the .B \-b option to tell @@ -3594,7 +3604,6 @@ You can suppress these messages by speci option, but if you do, you won't see the alternate device numbers reported in the warning messages. .SH "ALTERNATE DEVICE NUMBERS" -.PP On some dialects, when .I lsof has to break a block because it can't get information about a @@ -3692,14 +3701,12 @@ If you're not sure your dialect supplies for file systems from its mount table, use this .I lsof incantation to see if it reports any alternate device numbers: -.PP .IP lsof \-b .PP Look for standard error file warning messages that begin ``assuming "dev=xxxx" from ...''. .SH "KERNEL NAME CACHE" -.PP .I Lsof is able to examine the kernel's name cache or use other kernel facilities (e.g., the ADVFS 4.x tag_to_path() function under @@ -3771,7 +3778,6 @@ can't report path name components for so .I lsof FAQ (The \fBFAQ\fP section gives its location.) .SH "DEVICE CACHE FILE" -.PP Examining all members of the .I /dev (or @@ -3866,7 +3872,6 @@ writes a device cache file, it sets its of the executing process, and its permission modes to 0600, this restricting its reading and writing to the file's owner. .SH "LSOF PERMISSIONS THAT AFFECT DEVICE CACHE FILE ACCESS" -.PP Two permissions of the .I lsof executable affect its ability to access device cache files. @@ -3917,7 +3922,7 @@ and be allowed to surrender setgid permi NetBSD 1.[456], 2.x and 3.x for Alpha, x86, and SPARC-based systems NEXTSTEP 3.[13] for NEXTSTEP architectures - OpenBSD 2.[89] and 3.[0\-9] for x86-based systems + OpenBSD 2.[89] and 3.[0\(en9] for x86-based systems OPENSTEP 4.x SCO OpenServer Release 5.0.6 for x86-based systems SCO|Caldera UnixWare 7.1.4 for x86-based systems @@ -3939,7 +3944,6 @@ given to the executable don't apply to t Linux .fi .SH "DEVICE CACHE FILE PATH FROM THE \-D OPTION" -.PP The .B \-D option provides limited means for specifying the device cache file path. @@ -4033,7 +4037,6 @@ but only to a path it considers legitima .I lsof process effective and real UIDs. .SH "DEVICE CACHE PATH FROM AN ENVIRONMENT VARIABLE" -.PP .I Lsof's second choice for the device cache file is the contents of the LSOFDEVCACHE environment variable. @@ -4059,7 +4062,6 @@ Consult the output of .B \-D? for the environment variable's name. .SH "SYSTEM-WIDE DEVICE CACHE PATH" -.PP The local system administrator may choose to have a system\-wide device cache file when building .IR lsof . @@ -4091,7 +4093,6 @@ function in a root\-owned procedure. Once the file has been written, the procedure must change its permission modes to 0644 (owner\-read and owner\-write, group\-read, and other\-read). .SH "PERSONAL DEVICE CACHE PATH (DEFAULT)" -.PP The default device cache file path of the .I lsof distribution is one recorded in the home directory of the real UID @@ -4121,7 +4122,7 @@ The part of the second component is the base name of the executing host, as returned by .IR gethostname (2). -The base name is defined to be the characters preceding the first `.' +The base name is defined to be the characters preceding the first `.'\& in the .IR gethostname (2) output, or all the @@ -4160,7 +4161,6 @@ file of the .I lsof distribution. .SH "MODIFIED PERSONAL DEVICE CACHE PATH" -.PP If this option is defined by the local system administrator when .I lsof is built, the LSOFPERSDCPATH environment variable contents may @@ -4240,7 +4240,6 @@ It returns a zero (0) if no errors were option was specified or it was able to list some information about all the specified search arguments. .PP -.PP When .I lsof cannot open access to @@ -4316,7 +4315,7 @@ lsof \-i 6 To list all files using any protocol on ports 513, 514, or 515 of host wonderland.cc.purdue.edu, use: .IP -lsof \-i @wonderland.cc.purdue.edu:513\-515 +lsof \-i @wonderland.cc.purdue.edu:513\(en515 .PP To list all files using any protocol on any port of mace.cc.purdue.edu (cc.purdue.edu is the default domain), use: @@ -4569,34 +4568,33 @@ is available at .IP https://github.com/lsof\-org/lsof/releases .SH SEE ALSO -.PP Not all the following manual pages may exist in every UNIX dialect to which .I lsof has been ported. .PP -access(2), -awk(1), -crash(1), -fattach(3C), -ff(1), -fstat(8), -fuser(1), -gethostname(2), -isprint(3), -kill(1), -localtime(3), -lstat(2), -modload(8), -mount(8), -netstat(1), -ofiles(8L), -open(2), -perl(1), -ps(1), -readlink(2), -setlocale(3), -stat(2), -strftime(3), -time(2), -uname(1). +.BR access (2), +.BR awk (1), +.BR crash (1), +.BR fattach (3C), +.BR ff (1), +.BR fstat (8), +.BR fuser (1), +.BR gethostname (2), +.BR isprint (3), +.BR kill (1), +.BR localtime (3), +.BR lstat (2), +.BR modload (8), +.BR mount (8), +.BR netstat (1), +.BR ofiles (8L), +.BR open (2), +.BR perl (1), +.BR ps (1), +.BR readlink (2), +.BR setlocale (3), +.BR stat (2), +.BR strftime (3), +.BR time (2), +.BR uname (1).