From: Jay Freeman (saurik) Date: Wed, 15 Jan 2014 04:06:02 +0000 (-0800) Subject: Slightly improve "invalid pid" -p error message. X-Git-Tag: v0.9.500~51 X-Git-Url: https://git.saurik.com/cycript.git/commitdiff_plain/04aa6240f485c9abf1770555910861eb74f061db Slightly improve "invalid pid" -p error message. --- diff --git a/Console.cpp b/Console.cpp index cedd150..2a1b0f7 100644 --- a/Console.cpp +++ b/Console.cpp @@ -699,10 +699,8 @@ int Main(int argc, char const * const argv[], char const * const envp[]) { break; else { size += read; - if (size == sizeof(value)) { - pid = _not(pid_t); + if (size == sizeof(value)) goto fail; - } } } @@ -723,7 +721,7 @@ int Main(int argc, char const * const argv[], char const * const envp[]) { } if (pid == _not(pid_t)) { - fprintf(stderr, "invalid pid for -p\n"); + fprintf(stderr, "unable to find process `%s' using ps\n", arg); return 1; } }