From e6c4346b5030d843343fcdb61dc046f69ef90915 Mon Sep 17 00:00:00 2001 From: rsc Date: Sun, 23 Nov 2003 17:50:36 +0000 Subject: Use execvp to avoid hard-coding path names for ssh, samterm. --- src/cmd/sam/io.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/cmd/sam') diff --git a/src/cmd/sam/io.c b/src/cmd/sam/io.c index c0669631..b7317a9b 100644 --- a/src/cmd/sam/io.c +++ b/src/cmd/sam/io.c @@ -187,7 +187,7 @@ bootterm(char *machine, char **argv, char **end) close(remotefd1); argv[0] = "samterm"; *end = 0; - exec(samterm, argv); + execvp(samterm, argv); fprint(2, "can't exec %s: %r\n", samterm); _exits("damn"); } @@ -203,7 +203,7 @@ bootterm(char *machine, char **argv, char **end) close(pt2h[1]); argv[0] = "samterm"; *end = 0; - exec(samterm, argv); + execvp(samterm, argv); fprint(2, "can't exec: "); perror(samterm); _exits("damn"); @@ -237,7 +237,7 @@ connectto(char *machine) close(p1[1]); close(p2[0]); close(p2[1]); - execl(RXPATH, RX, machine, rsamname, "-R", (char*)0); + execlp(RXPATH, RX, machine, rsamname, "-R", (char*)0); dprint("can't exec %s\n", RXPATH); exits("exec"); -- cgit v1.2.3