diff options
| author | rsc <devnull@localhost> | 2004-04-29 17:13:24 +0000 |
|---|---|---|
| committer | rsc <devnull@localhost> | 2004-04-29 17:13:24 +0000 |
| commit | be36ff68854c86247fdc769c0eaa89eb284b5ca7 (patch) | |
| tree | a523e17071eb0e3088f906446b158b3d184b77fe /src/libthread/id.c | |
| parent | 3d72637f9b4c42b1fc9b7d95d278ea3dd65c748d (diff) | |
| download | plan9port-be36ff68854c86247fdc769c0eaa89eb284b5ca7.tar.gz plan9port-be36ff68854c86247fdc769c0eaa89eb284b5ca7.zip | |
add -W to specify window size.
various other little fixes.
Diffstat (limited to 'src/libthread/id.c')
| -rw-r--r-- | src/libthread/id.c | 12 |
1 files changed, 6 insertions, 6 deletions
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()); |
