20110121
1. ln方法(原子的)#!/bin/sh
LOCKFILE=/tmp/`basename
$0`.lock#get lock
ln -s
$0 $LOCKFILEif
[ $? -gt
0 ];thenecho
"$0 re-entry or pid file forgot to delete, please check it"exit
2fi#do you work at here#unlockrm-f
$LOCKFILE2. lock file(原子的) #!/bin
原创
2011-01-21 16:33:00 ·
435 阅读 ·
0 评论