From be36ff68854c86247fdc769c0eaa89eb284b5ca7 Mon Sep 17 00:00:00 2001 From: rsc Date: Thu, 29 Apr 2004 17:13:24 +0000 Subject: add -W to specify window size. various other little fixes. --- src/libthread/id.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/libthread/id.c') diff --git a/src/libthread/id.c b/src/libthread/id.c index 727798d3..e920b87b 100644 --- a/src/libthread/id.c +++ b/src/libthread/id.c @@ -52,20 +52,20 @@ threadgetgrp(void) } void -threadsetname(char *name) +threadsetname(char *fmt, ...) { -/* - int fd, n; - char buf[128], *s; -*/ Proc *p; Thread *t; + va_list arg; p = _threadgetproc(); t = p->thread; if (t->cmdname) free(t->cmdname); - t->cmdname = strdup(name); + va_start(arg, fmt); + t->cmdname = vsmprint(fmt, arg); + va_end(fmt); + /* Plan 9 only if(p->nthreads == 1){ snprint(buf, sizeof buf, "#p/%d/args", getpid()); -- cgit v1.2.3