plan9port

fork of plan9port with libvec, libstr and libsdb
Log | Files | Refs | README | LICENSE

commit e6c4346b5030d843343fcdb61dc046f69ef90915
parent d8b652ae6f0034a9c8c63699b98e62775f7831db
Author: rsc <devnull@localhost>
Date:   Sun, 23 Nov 2003 17:50:36 +0000

Use execvp to avoid hard-coding path names for ssh, samterm.

Diffstat:
Msrc/cmd/sam/io.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git 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");