fix for lock.info
Richard D. Williams
richard at appgrp.net
Tue Oct 3 13:17:03 PDT 2006
I don't know if anyone else has fixed this already, but I have noticed
when I run the lock.info script it always lists filepro as the user.
This makes it difficult to determine who really has a record locked. I
have added this line to the script and I find it works well.
# Get the user names, ttys and commands being executed:
for i in $I
do # Get user name, tty & command for the process holding the lock:
eval $( $PS -ef |
$AWK -v PID="${PID[i]}" '
$2 == PID { print "USER=" $1 ; print "TTY=" $6
$1 = $2 = $3 = $4 = $5 = $6 = $7 = "" ; sub(/^[
\t]+/,"")
print "CMD=\"" $0 "\"" }' )
# Print the results:
USER=`w | grep $TTY | awk '{print $1}'`
$ECHO "
filePro File: $PFNAME
Record Number: ${REC_NUM[i]}
User: $USER
TTY: $TTY
PID: ${PID[i]}
Richard D. Williams
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.celestial.com/pipermail/filepro-list/attachments/20061004/3e579fa1/attachment.html
More information about the Filepro-list
mailing list