Everything seems to work fine when I do the following...
Now when I add it to a perl script like in the followingCode:% lockf -t 30 /usr/party/log/party.log sleep 30
It doesn't work even though lockf shows up on my ps table.Code:#!/usr/bin/perl use warnings; my $value; while (True) { if(`w | grep cd | grep party`) { `lockf -t 30 /usr/party/log/party.log sleep 30`; sleep(30); } else { print "not logged in\n"; } sleep(1); }
I don't get why it fails when I run it in a perl script.cdalten 50123 0.0 0.2 3764 2580 pl IN 12:51PM 0:00.32 -zsh (zsh)
cdalten 52997 0.0 0.2 2796 2276 pl SN+ 1:30PM 0:00.05 /usr/bin/perl ./scan.pl (perl5.8.8)
cdalten 53078 0.0 0.1 1256 596 pl SN+ 1:31PM 0:00.00 lockf -t 30 /usr/party/log/party.log sleep 30
cdalten 53079 0.0 0.0 1256 432 pl SN+ 1:31PM 0:00.00 sleep 30



LinkBack URL
About LinkBacks



