shithub: mq

Download patch

ref: 72923348e0383cdc4b1756f90bd41d0054e34433
parent: 02ce9b85e1a75ace6e7a9b78bb5533b9d4f8569d
author: kvik <kvik@a-b.xyz>
date: Mon Aug 31 09:58:03 EDT 2020

insert into the list when pipe fully created

--- a/src/mq.c
+++ b/src/mq.c
@@ -167,11 +167,11 @@
 
 	mq = parent->aux;
 	p = pipealloc(mq);
-	listlink(mq->pipes, p);
 	if((f = createfile(parent, name, uid, perm, p)) == nil){
 		pipeclose(p);
 		return nil;
 	}
+	listlink(mq->pipes, p);
 	filesettype(f, Qpipe);
 	return f;
 }