From 85d59af5be84d122adab484a9c961462d4fdbfda Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Mon, 9 Dec 2024 01:57:26 +0100 Subject: smp: Simplify passing argv --- sutils/smp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sutils/smp.c b/sutils/smp.c index f9147528..b3306a19 100644 --- a/sutils/smp.c +++ b/sutils/smp.c @@ -63,10 +63,10 @@ smp (char * const argv[]) mach_port_deallocate (mach_task_self (), _hurd_host_priv); setuid (getuid ()); - execve (argv[1], &argv[1], environ); + execve (argv[0], argv, environ); /* Fall through if not executed */ - error (1, errno, "failed to execute %s", argv[1]); + error (1, errno, "failed to execute %s", argv[0]); } int @@ -75,6 +75,6 @@ main (int argc, char **argv) if (argc < 2) error (1, 0, "Usage: smp /path/to/executable"); - smp (argv); + smp (argv + 1); return 0; } -- cgit v1.2.3