Skip to content

Commit

Permalink
doc/strace.1: elaborate on support of multiple PIDs as a -p argument
Browse files Browse the repository at this point in the history
While it was mentioned that -p "`pidof PROG`" syntax is supported,
it was not explicitly stated what characters can be used as separators
(like newline, which is used by pgrep, as noted in process_opt_p_list).

* doc/strace.1.in (.SS Startup): Explicitly mention that multiple PIDs
can be provided as an argument to a single -p option;  list all
supported separator characters;  mention possible -p "$(pgrep PROG)"
syntax.
  • Loading branch information
esyr authored and ldv-alt committed Nov 25, 2021
1 parent 199fdac commit 13435b6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion doc/strace.1.in
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,15 @@ options can be used to attach to many processes in addition to
(which is optional if at least one
.B \-p
option is given).
Multiple process IDs, separated by either
comma (\(lq,\(rq), space (\(lq \(rq), tab, or newline character,
can be provided as an argument to a single
.B \-p
"`pidof PROG`" syntax is supported.
option, so, for example,
.B \-p
"$(pidof PROG)" and
.B \-p
"$(pgrep PROG)" syntaxes are supported.
.TP
.BI "\-u " username
.TQ
Expand Down

1 comment on commit 13435b6

@masatake
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Please sign in to comment.