Skip to content
This repository has been archived by the owner on Jun 30, 2021. It is now read-only.

Commit

Permalink
detect and signal failure to create tmp file
Browse files Browse the repository at this point in the history
  • Loading branch information
Enrico Tassi committed Nov 7, 2015
1 parent 5fec21d commit 86f17a2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions smd-common
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down

0 comments on commit 86f17a2

Please sign in to comment.