]> git.lizzy.rs Git - plan9front.git/blobdiff - sys/src/libthread/id.c
fix fuckup
[plan9front.git] / sys / src / libthread / id.c
index f8946c214b7ade15bb42e7e217ad0d8c31073736..ebb563307cdcc8d2b153d662844ac86fc5ac0775 100644 (file)
@@ -71,7 +71,7 @@ threadsetname(char *fmt, ...)
        va_start(arg, fmt);
        t->cmdname = vsmprint(fmt, arg);
        va_end(arg);
-       if(t->cmdname){
+       if(t->cmdname && p->nthreads == 1){
                snprint(buf, sizeof buf, "#p/%lud/args", _tos->pid); //getpid());
                if((fd = open(buf, OWRITE)) >= 0){
                        write(fd, t->cmdname, strlen(t->cmdname)+1);