Commit 67dc2ae3 authored by Rob Pike's avatar Rob Pike

a couple of usage fixups in prof

R=rsc
https://golang.org/cl/161050
parent db18ce2f
......@@ -462,8 +462,14 @@ main(int argc, char *argv[])
}
if(argc > 0)
file = argv[0];
else if(pid)
else if(pid) {
file = proctextfile(pid);
if (file == NULL) {
fprint(2, "prof: can't find file for pid %d: %r\n", pid);
fprint(2, "prof: on Darwin, need to provide file name explicitly\n");
exit(1);
}
}
fd = open(file, 0);
if(fd < 0) {
fprint(2, "prof: can't open %s: %r\n", file);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment