ref: 1c1586d5465b91cd523d6bf15e042c5c854a6e27
parent: 71a993b4ca2c455f491aad669e3a4ac2979f6bb8
author: cinap_lenrek <[email protected]>
date: Tue Jan 3 14:41:00 EST 2023
tlsclient: try /bin/$cmd for exec
--- a/sys/src/cmd/tlsclient.c
+++ b/sys/src/cmd/tlsclient.c
@@ -152,7 +152,9 @@
dup(fd, 1);
/* dup(fd, 2); keep stderr */
if(fd > 2) close(fd);
- exec(*argv, argv);
+ exec(argv[0], argv);
+ if(argv[0][0] != '/')
+ exec(smprint("/bin/%s", argv[0]), argv);
sysfatal("exec: %r");
}
@@ -168,5 +170,5 @@
break;
}
postnote(PNGROUP, getpid(), "die yankee pig dog");
- exits(0);
+ exits(nil);
}