summaryrefslogtreecommitdiff
path: root/sys/src
diff options
context:
space:
mode:
authorFulton Browne <git@fulton.software>2021-06-12 17:20:53 +0000
committerFulton Browne <git@fulton.software>2021-06-12 17:20:53 +0000
commit1c30bd451e1813f1cf9f9db4d7c1a4f3f95d1e37 (patch)
tree05b1b2e936e3cdfa3b4a43a31a7e4a2e758024df /sys/src
parent73db7a20f7a3195967d77b972e4eaa5602d2d4bf (diff)
B, sam: remove sam srv file
No need for 2 programs doing the same job.
Diffstat (limited to 'sys/src')
-rw-r--r--sys/src/cmd/samterm/io.c3
-rw-r--r--sys/src/cmd/samterm/plan9.c33
-rw-r--r--sys/src/cmd/samterm/samterm.h1
3 files changed, 1 insertions, 36 deletions
diff --git a/sys/src/cmd/samterm/io.c b/sys/src/cmd/samterm/io.c
index 86fb4ceb3..bd9b3a3b6 100644
--- a/sys/src/cmd/samterm/io.c
+++ b/sys/src/cmd/samterm/io.c
@@ -43,8 +43,7 @@ initio(void)
threadexitsall("kbd");
}
hoststart();
- if(plumbstart() < 0)
- extstart();
+ plumbstart();
}
void
diff --git a/sys/src/cmd/samterm/plan9.c b/sys/src/cmd/samterm/plan9.c
index 0022d4b28..3d2065d82 100644
--- a/sys/src/cmd/samterm/plan9.c
+++ b/sys/src/cmd/samterm/plan9.c
@@ -147,39 +147,6 @@ extproc(void *argv)
}
}
-void
-extstart(void)
-{
- char buf[32];
- int fd;
- static int p[2];
- static void *arg[2];
-
- if(pipe(p) < 0)
- return;
- sprint(exname, "/srv/sam.%s", getuser());
- fd = create(exname, 1, 0600);
- if(fd < 0){ /* assume existing guy is more important */
- Err:
- close(p[0]);
- close(p[1]);
- return;
- }
- sprint(buf, "%d", p[0]);
- if(write(fd, buf, strlen(buf)) <= 0)
- goto Err;
- close(fd);
- /*
- * leave p[0] open so if the file is removed the event
- * library won't get an error
- */
- plumbc = chancreate(sizeof(int), 0);
- arg[0] = plumbc;
- arg[1] = &p[1];
- proccreate(extproc, arg, STACK);
- atexit(removeextern);
-}
-
int
plumbformat(int i)
{
diff --git a/sys/src/cmd/samterm/samterm.h b/sys/src/cmd/samterm/samterm.h
index da8fea641..264d148e2 100644
--- a/sys/src/cmd/samterm/samterm.h
+++ b/sys/src/cmd/samterm/samterm.h
@@ -103,7 +103,6 @@ void startnewfile(int, Text*);
void getmouse(void);
void mouseunblock(void);
void kbdblock(void);
-void extstart(void);
void hoststart(void);
int plumbstart(void);
int button(int but);