ref: 3b9fe7a7e30c4bc16954b45f25b42227c08a66c4
parent: 3d5fc7e2fbfc5db4e4d9067511438d2c33578643
author: cinap_lenrek <cinap_lenrek@gmx.de>
date: Wed Sep 11 17:23:45 EDT 2013
acme: use threadexitsall() to tear down mouse and keyboard procs on error
--- a/sys/src/cmd/acme/acme.c
+++ b/sys/src/cmd/acme/acme.c
@@ -167,19 +167,19 @@
cwarn = chancreate(sizeof(void*), 1);
if(cwait==nil || ccommand==nil || ckill==nil || cxfidalloc==nil || cxfidfree==nil || cerr==nil || cexit==nil || cwarn==nil){fprint(2, "acme: can't create initial channels: %r\n");
- exits("channels");+ threadexitsall("channels");}
mousectl = initmouse(nil, screen);
if(mousectl == nil){fprint(2, "acme: can't initialize mouse: %r\n");
- exits("mouse");+ threadexitsall("mouse");}
mouse = mousectl;
keyboardctl = initkeyboard(nil);
if(keyboardctl == nil){fprint(2, "acme: can't initialize keyboard: %r\n");
- exits("keyboard");+ threadexitsall("keyboard");}
mainpid = getpid();
plumbeditfd = plumbopen("edit", OREAD|OCEXEC);--
⑨