.\" along with this program; if not, write to the Free Software
.\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
.\"
-.TH PIDOF 1 "2018-03-03" "" "User Commands"
+.TH PIDOF 1 "2019-09-21" "" "User Commands"
.SH NAME
pidof -- find the process ID of a running program.
.SH SYNOPSIS
.IP "-S \fIseparator\fP"
Use \fIseparator\fP as a separator put between pids. Used only when
more than one pids are printed for the program.
+The \fI\-d\fR option is an alias for this option for sysvinit pidof
+compatibility.
.SH "EXIT STATUS"
.TP
.B 0
int first_pid = 1;
const char *separator = " ";
- const char *opts = "scnxmo:S:?Vh";
+ const char *opts = "scdnxmo:S:?Vh";
static const struct option longopts[] = {
{"check-root", no_argument, NULL, 'c'},
{"single-shot", no_argument, NULL, 's'},
{"omit-pid", required_argument, NULL, 'o'},
- {"separator", required_argument, NULL, 's'},
+ {"separator", required_argument, NULL, 'S'},
{"help", no_argument, NULL, 'h'},
{"version", no_argument, NULL, 'V'},
{NULL, 0, NULL, 0}
pidof_root = pid_link(getpid(), "root");
}
break;
+ case 'd': /* sysv pidof uses this for S */
case 'S':
separator = optarg;
break;