Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F101949211
D46475.id142587.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
822 B
Referenced Files
None
Subscribers
None
D46475.id142587.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 $?' 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
Wed, Nov 6, 5:57 PM (24 m, 1 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
11233662
Default Alt Text
D46475.id142587.diff (822 B)
Attached To
Mode
D46475: locate.updatedb: Explicitly exit from trap code.
Attached
Detach File
Event Timeline
Log In to Comment