crontab - why flock run two process? -
[root@vm_47_86_centos bin]# ps -ef | grep moni root 2078 2075 0 apr04 ? 00:00:00 flock -xn /tmp/svr_lock /data1/svr/bin/monitor.sh root 2082 2078 0 apr04 ? 00:07:35 /bin/bash /data1/svr/bin/monitor.sh root 3438 3303 0 10:30 pts/0 00:00:00 grep --color=auto moni root 14249 14243 0 apr04 ? 00:00:00 flock -xn /tmp/svr_lock /data1/svr/bin/monitor.sh root 14253 14249 0 apr04 ? 00:07:32 /bin/bash /data1/svr/bin/monitor.sh crontab : * * * * * flock -xn /tmp/svr_lock /data1/svr/bin/monitor.sh monitor.sh damon. why use flock or there 2 processes