From 86f17a2396367c4ff28f04727a32508639599417 Mon Sep 17 00:00:00 2001 From: Enrico Tassi Date: Sat, 7 Nov 2015 15:58:09 +0100 Subject: [PATCH] detect and signal failure to create tmp file --- smd-common | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/smd-common b/smd-common index 7135a6b..794f7a2 100644 --- a/smd-common +++ b/smd-common @@ -26,6 +26,10 @@ atexit_kill() { gc_mktemp() { local tmp=`mktemp -q /tmp/smd.XXXXXXXXXX` + if [ -z "$tmp" ]; then + echo "Failed to create temp file in /tmp. Is the disk full?" + exit 1 + fi atexit_rm $tmp RC="$tmp" }