Fix removal of TMP by moving cleanup trap into main just after mktemp
PATCH 1/1 Fix removal of TMP by moving cleanup trap into main just after mktemp
If user have TMP set and run 'runltp -h' their whole TMP dir is removed.
Suggested-by Cyril Hrubis <[email protected]>
Signed-off-by Vitaly Chikunov <[email protected]>
--- runltp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
runltp +2 -1
@@ -552,6 +552,8 @@ main() # write to it as user nobody export TMPDIR=$TMP + trap "cleanup" 0 + chmod 777 $TMP || \ { echo "unable to chmod 777 $TMP ... aborting"
@@ -952,7 +954,6 @@ cleanup() LTP_SCRIPT="$(basename $0)" if [ "$LTP_SCRIPT" = "runltp" ]; then - trap "cleanup" 0 setup main "$@" fi
Signature · 1 line
2.11.0
PATCH 1/1 Fix removal of TMP by moving cleanup trap into main just after mktemp
Hi!
Pushed, thanks.
Signature · 2 lines
Cyril Hrubis [email protected]