better comment
This commit is contained in:
parent
65f6685c05
commit
6661d641dd
11
peek/peek.c
11
peek/peek.c
@ -47,12 +47,11 @@ int main(int argc, char *argv[]){
|
||||
default: goto usage;
|
||||
}
|
||||
|
||||
/* If -p is used there must be additional arguments. This is to support
|
||||
* arbitrary arguments to the command specified but has the side-effect
|
||||
* of being inconsistent with other programs in that the usage
|
||||
* 'peek -p1n cat' would work, where usually the 'cat' program would
|
||||
* have to be specified immediately after -p as in 'peek -1np cat'.
|
||||
* This is fine, though, because all intended usages work fine. */
|
||||
/* If -p is used there must be additional arguments. Getopt(3) wouldn't
|
||||
* work for this because optarg would have to be one string to give to
|
||||
* system(3) or an equivalent and it would be a mess of parsing and
|
||||
* security issues. Any intended usage works with this slightly funkier
|
||||
* argument parsing, unintended usages work as happy coincidence. */
|
||||
if((argc > optind) == (outputs[2] == 0)){
|
||||
usage: fprintf(stderr, "Usage: %s (-1enot)"
|
||||
" (-p [program [arguments...]])\n",
|
||||
|
Loading…
Reference in New Issue
Block a user