From: Alan Cox Date: Wed, 20 Sep 2017 13:01:35 +0000 (+0100) Subject: outstack: error checking X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=00df5deabf60c58284084852619277f280023fc5;p=FUZIX.git outstack: error checking --- diff --git a/Applications/SmallC/outstack.c b/Applications/SmallC/outstack.c index 8c6724e1..5d7506a9 100644 --- a/Applications/SmallC/outstack.c +++ b/Applications/SmallC/outstack.c @@ -64,6 +64,10 @@ void end_defer(void) void defer_init(void) { - defer = open("scc-spool", O_RDWR|O_CREAT|O_TRUNC, 0600); -// unlink("scc-spool"); + defer = open(".scc-spool", O_RDWR|O_CREAT|O_TRUNC, 0600); + if (defer == -1) { + error("tmp file open failed"); + exit(1); + } + unlink("scc-spool"); }