From 6bb2c4b1c55d91eb8338aa23e60772c650af2a20 Mon Sep 17 00:00:00 2001 From: Riccardo Schirone Date: Thu, 23 Sep 2021 20:35:19 +0200 Subject: [PATCH] Add pid/pidfile on man/rz-run and make pid option a boolean (#1741) --- librz/socket/run.c | 2 +- man/rz-run.1 | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/librz/socket/run.c b/librz/socket/run.c index 118b0b6ee7..44004b0ff7 100644 --- a/librz/socket/run.c +++ b/librz/socket/run.c @@ -505,7 +505,7 @@ RZ_API bool rz_run_parseline(RzRunProfile *p, const char *b) { } else if (!strcmp(b, "aslr")) { p->_aslr = parseBool(e); } else if (!strcmp(b, "pid")) { - p->_pid = atoi(e); + p->_pid = parseBool(e); } else if (!strcmp(b, "pidfile")) { p->_pidfile = strdup(e); } else if (!strcmp(b, "connect")) { diff --git a/man/rz-run.1 b/man/rz-run.1 index 5091cdef5a..b4bfb79ff0 100644 --- a/man/rz-run.1 +++ b/man/rz-run.1 @@ -62,6 +62,10 @@ preload a library (not supported on Windows, only linux,osx,bsd) Set to false by default, otherwise it will run the program in background, detached from the terminal. .It Ar program path to program to be executed +.It Ar pid +set to true to print the PID of the process to stderr +.It Ar pidfile +print the PID of the process to the specified file .It Ar execve use execve instead of posix_spawn (osx tricks) .It Ar runlib