diff options
author | BurnZeZ <brz-9dev@feline.systems> | 2016-03-01 19:40:14 -0500 |
---|---|---|
committer | BurnZeZ <brz-9dev@feline.systems> | 2016-03-01 19:40:14 -0500 |
commit | 33131a98b96729b5ac59a292867ddb710ed025ec (patch) | |
tree | 8a5b3f9db3552769be9c1e44c9df375da40f2506 /sys/src/cmd | |
parent | 9d1e80cbbb966c1206a27f1dabf9cb5e85709ba7 (diff) |
plot: handle create() failure
Diffstat (limited to 'sys/src/cmd')
-rw-r--r-- | sys/src/cmd/plot/plot.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/src/cmd/plot/plot.c b/sys/src/cmd/plot/plot.c index 591efe96b..2c90ef15b 100644 --- a/sys/src/cmd/plot/plot.c +++ b/sys/src/cmd/plot/plot.c @@ -673,7 +673,8 @@ int server(void){ 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); |