From ba8d80d444cc71a71fb6f0c6fd3b2b9fe5ae2246 Mon Sep 17 00:00:00 2001 From: nick black Date: Fri, 22 May 2020 09:16:41 -0400 Subject: [PATCH] procroller: don't recurse on argv[0], whoops --- src/poc/procroller.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/poc/procroller.c b/src/poc/procroller.c index c6050a2a2..b10c9eeeb 100644 --- a/src/poc/procroller.c +++ b/src/poc/procroller.c @@ -37,7 +37,7 @@ eofcb(struct ncfdplane* ncfd, int nerrno, void* curry){ int main(int argc, char** argv){ if(argc < 2){ - fprintf(stderr, "usage: procroller binary [ args... ]\n"); + fprintf(stderr, "usage: %s binary [ args... ]\n", *argv); return EXIT_FAILURE; } setlocale(LC_ALL, ""); @@ -49,6 +49,7 @@ int main(int argc, char** argv){ if(nc == NULL){ return EXIT_FAILURE; } + ++argv; struct ncplane* n = notcurses_stdplane(nc); ncsubproc_options nopts = {}; struct ncsubproc* nsproc = ncsubproc_createvp(n, &nopts, *argv, argv, cb, eofcb);