aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2024-12-09 01:57:26 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2024-12-09 01:57:26 +0100
commit85d59af5be84d122adab484a9c961462d4fdbfda (patch)
treee7523b3a8b81f84ce344300f57e5e08fa565765f
parent6db346c1b8e193f6b8d1861364bb3498c4def4ab (diff)
downloadhurd-85d59af5be84d122adab484a9c961462d4fdbfda.tar.gz
hurd-85d59af5be84d122adab484a9c961462d4fdbfda.tar.bz2
hurd-85d59af5be84d122adab484a9c961462d4fdbfda.zip
smp: Simplify passing argv
-rw-r--r--sutils/smp.c6
1 files 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;
}