Update of /cvsroot/lastbash/lastbash
In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv6182
Modified Files:
lastbash
Log Message:
Use the correct PID for the lock file.
Index: lastbash
===================================================================
RCS file: /cvsroot/lastbash/lastbash/lastbash,v
retrieving revision 1.95
retrieving revision 1.96
diff -u -d -r1.95 -r1.96
--- lastbash 8 Dec 2006 15:00:35 -0000 1.95
+++ lastbash 8 Dec 2006 18:12:49 -0000 1.96
@@ -1758,8 +1758,10 @@
{
# $@ - the commands
+ local PID="$$"
+
# Check and create the lock
- if ( set -o noclobber; echo "$$" > "${COMMAND_FILE_LOCK}" ) 2>/dev/null
+ if ( set -o noclobber; echo "${PID}" > "${COMMAND_FILE_LOCK}" ) 2>/dev/null
then
# Create the lock
echo "$$" > "${COMMAND_FILE_LOCK}"
@@ -1803,10 +1805,10 @@
#-----------------------------------------------------------------------------
function sigusr1()
{
- local CMD ARGS
+ local CMD ARGS PID="$$"
# Check and create the lock
- if ( set -o noclobber; echo "$$" > "${COMMAND_FILE_LOCK}" ) 2>/dev/null
+ if ( set -o noclobber; echo "${PID}" > "${COMMAND_FILE_LOCK}" ) 2>/dev/null
then
# Check the command file exists
if [ -f "${COMMAND_FILE}" ]
|