Signed-off-by: Francois Gouget fgouget@codeweavers.com --- winetest/winetest.cron | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/winetest/winetest.cron b/winetest/winetest.cron index 7418f9ec9..611901380 100755 --- a/winetest/winetest.cron +++ b/winetest/winetest.cron @@ -31,6 +31,10 @@ then exit 1 fi lock="/tmp/winetest.lock" +cleanup() +{ + rm -f "$lock" +}
# expiration age (in days) before results get archived expire=120 @@ -38,6 +42,7 @@ expire=120 if [ ! -f "$lock" ] then touch "$lock" + trap cleanup EXIT cd "$workdir"
refresh_index="" @@ -87,6 +92,4 @@ then # remove old queue files find queue -maxdepth 1 -mtime +30 -name "err*" -print0 | xargs -0 rm -rf find queue -maxdepth 1 -mtime +30 -name "CGI*" -print0 | xargs -0 rm -f - - rm "$lock" fi