Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F115611343
D46475.id142588.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
823 B
Referenced Files
None
Subscribers
None
D46475.id142588.diff
View Options
diff --git a/usr.bin/locate/locate/updatedb.sh b/usr.bin/locate/locate/updatedb.sh
--- a/usr.bin/locate/locate/updatedb.sh
+++ b/usr.bin/locate/locate/updatedb.sh
@@ -45,10 +45,11 @@
if ! TMPDIR=`mktemp -d $TMPDIR/locateXXXXXXXXXX`; then
exit 1
fi
+tmp=$TMPDIR/_updatedb$$
+trap 'rc=$?; rm -f $tmp; rmdir $TMPDIR; trap - 0; exit $rc' 0 1 2 3 5 10 15
PATH=$LIBEXECDIR:/bin:/usr/bin:$PATH; export PATH
-
: ${mklocatedb:=locate.mklocatedb} # make locate database program
: ${FCODES:=/var/db/locate.database} # the database
: ${SEARCHPATHS="/"} # directories to be put in the database
@@ -87,9 +88,6 @@
done
fi
-tmp=$TMPDIR/_updatedb$$
-trap 'rm -f $tmp; rmdir $TMPDIR' 0 1 2 3 5 10 15
-
# search locally
if $find -s $SEARCHPATHS $excludes -or -print 2>/dev/null |
$mklocatedb -presort > $tmp
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Apr 26, 11:42 PM (10 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17810663
Default Alt Text
D46475.id142588.diff (823 B)
Attached To
Mode
D46475: locate.updatedb: Explicitly exit from trap code.
Attached
Detach File
Event Timeline
Log In to Comment