tUse execvp to avoid hard-coding path names for ssh, samterm. - plan9port - [fork] Plan 9 from user space
 (HTM) git clone git://src.adamsgaard.dk/plan9port
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit e6c4346b5030d843343fcdb61dc046f69ef90915
 (DIR) parent d8b652ae6f0034a9c8c63699b98e62775f7831db
 (HTM) 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:
         M src/cmd/sam/io.c                    |       6 +++---
       
       1 file changed, 3 insertions(+), 3 deletions(-)
       ---
 (DIR) diff --git a/src/cmd/sam/io.c b/src/cmd/sam/io.c
       t@@ -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");
                }
       t@@ -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");
       t@@ -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");