]> git.lizzy.rs Git - plan9front.git/blobdiff - sys/src/lib9p/queue.c
acme: fix border size, autoindent undo: imported from plan9port (thanks jxy)
[plan9front.git] / sys / src / lib9p / queue.c
index 478f40dddd13d07c1ee3e8929261027ce7c0c34f..ff846cfd8ab95802c84d8a5ea8c63b67fdfc4a9e 100644 (file)
@@ -16,8 +16,8 @@ _reqqueueproc(void *v)
        q = v;
        rfork(RFNOTEG);
 
-       buf = smprint("/proc/%d/ctl", getpid());
-       fd = open(buf, OWRITE);
+       buf = smprint("/proc/%lud/ctl", (ulong)getpid());
+       fd = open(buf, OWRITE|OCEXEC);
        free(buf);
        
        for(;;){
@@ -40,6 +40,8 @@ _reqqueueproc(void *v)
                f(r);
        }
 
+       if(fd >= 0)
+               close(fd);
        free(r);
        free(q);
        threadexits(nil);