From 00df5deabf60c58284084852619277f280023fc5 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Wed, 20 Sep 2017 14:01:35 +0100 Subject: [PATCH] outstack: error checking --- Applications/SmallC/outstack.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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"); } -- 2.34.1