From 0647d5d54ce6678696fe3ce992f7e2187114dfa7 Mon Sep 17 00:00:00 2001 From: Gustavo Sverzut Barbieri Date: Wed, 24 Oct 2012 19:04:01 +0000 Subject: [PATCH] abort if cannot create /tmp file for cpp (epp). one user complained that if /tmp wasn't writable (...?) it would keep going but would abort with a message that his #define were not being replaced, which is strange. at the end the reason was it did not abort on mkstemp() failure. SVN revision: 78408 --- legacy/edje/src/bin/edje_cc_parse.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/legacy/edje/src/bin/edje_cc_parse.c b/legacy/edje/src/bin/edje_cc_parse.c index 9695700b79..3c99aa061a 100644 --- a/legacy/edje/src/bin/edje_cc_parse.c +++ b/legacy/edje/src/bin/edje_cc_parse.c @@ -787,6 +787,10 @@ compile(void) else *p = 0; snprintf(tmpn, PATH_MAX, "%s/edje_cc.edc-tmp-XXXXXX", tmp_dir); fd = mkstemp(tmpn); + if (fd < 0) + error_and_abort(ef, "Unable to open temp file \"%s\" for pre-processor.", + sc->tmpn); + if (fd >= 0) { int ret;