git: 9front

Download patch

ref: ff0284a71c3c27710b7a15b6834df521cd3e5fab
parent: 94c2bcc83eb84c4cba844aae6809e40085b10b96
author: BurnZeZ <brz-9dev@feline.systems>
date: Tue Mar 1 14:40:14 EST 2016

plot: handle create() failure

--- a/sys/src/cmd/plot/plot.c
+++ b/sys/src/cmd/plot/plot.c
@@ -673,7 +673,8 @@
 	int fd, p[2];
 	char buf[32];
 	pipe(p);
-	fd = create("/srv/plot", 1, 0666);
+	if((fd = create("/srv/plot", OWRITE, 0666)) < 0)
+		sysfatal("open: %r");
 	sprint(buf, "%d", p[1]);
 	write(fd, buf, strlen(buf));
 	close(fd);
--