summaryrefslogtreecommitdiff
path: root/sys/src/cmd/execnet
diff options
context:
space:
mode:
authorftrvxmtrx <devnull@localhost>2014-05-03 13:07:52 +0200
committerftrvxmtrx <devnull@localhost>2014-05-03 13:07:52 +0200
commitd2c3185bfa486bb3f60d23771c701cfeaa1316db (patch)
treeef888f3c39c10fd1b28683be3b3db373ea85ad65 /sys/src/cmd/execnet
parent6f58f7fed4e6e00e6632ff9fe5bc56e75879424f (diff)
fix threadsetname usage in few places
Diffstat (limited to 'sys/src/cmd/execnet')
-rw-r--r--sys/src/cmd/execnet/client.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/sys/src/cmd/execnet/client.c b/sys/src/cmd/execnet/client.c
index 0b90c181c..ebd723d5c 100644
--- a/sys/src/cmd/execnet/client.c
+++ b/sys/src/cmd/execnet/client.c
@@ -215,11 +215,9 @@ readthread(void *a)
Client *c;
Ioproc *io;
Msg *m;
- char tmp[32];
c = a;
- snprint(tmp, sizeof tmp, "read%d", c->num);
- threadsetname(tmp);
+ threadsetname("read%d", c->num);
buf = emalloc(8192);
io = c->readerproc;
@@ -279,11 +277,9 @@ writethread(void *a)
Ioproc *io;
Req *r;
Client *c;
- char tmp[32];
c = a;
- snprint(tmp, sizeof tmp, "write%d", c->num);
- threadsetname(tmp);
+ threadsetname("write%d", c->num);
buf = emalloc(8192);
io = c->writerproc;
@@ -320,11 +316,9 @@ execproc(void *a)
{
int i, fd;
Client *c;
- char tmp[32];
c = a;
- snprint(tmp, sizeof tmp, "execproc%d", c->num);
- threadsetname(tmp);
+ threadsetname("execproc%d", c->num);
if(pipe(c->fd) < 0){
rerrstr(c->err, sizeof c->err);
sendul(c->execpid, -1);
@@ -346,11 +340,9 @@ execthread(void *a)
{
Client *c;
int p;
- char tmp[32];
c = a;
- snprint(tmp, sizeof tmp, "exec%d", c->num);
- threadsetname(tmp);
+ threadsetname("exec%d", c->num);
c->execpid = chancreate(sizeof(ulong), 0);
proccreate(execproc, c, STACK);
p = recvul(c->execpid);