Re: [PHP] Re: skinning a cat

2008-09-02 Thread Robert Cummings
On Tue, 2008-09-02 at 18:02 +0200, Per Jessen wrote: > Robert Cummings wrote: > > > You originally said it was overkill to use my lock class and then went > > on to show your shell script doing similar. To which I then responded > > try running the shell script in windows. To which you've now sugg

Re: [PHP] Re: skinning a cat

2008-09-02 Thread Per Jessen
Robert Cummings wrote: > You originally said it was overkill to use my lock class and then went > on to show your shell script doing similar. To which I then responded > try running the shell script in windows. To which you've now suggested > installing cygwin. Well, no I haven't, but feel free

Re: [PHP] Re: skinning a cat

2008-09-02 Thread Robert Cummings
On Tue, 2008-09-02 at 16:23 +0200, Per Jessen wrote: > Robert Cummings wrote: > > > On Tue, 2008-09-02 at 07:52 +0200, Per Jessen wrote: > >> Lupus Michaelis wrote: > >> > >> > Robert Cummings a écrit : > >> > > >> >> Try running that on windows. > >> > > >> >No problem > >> >

Re: [PHP] Re: skinning a cat

2008-09-02 Thread Per Jessen
Robert Cummings wrote: > On Tue, 2008-09-02 at 07:52 +0200, Per Jessen wrote: >> Lupus Michaelis wrote: >> >> > Robert Cummings a écrit : >> > >> >> Try running that on windows. >> > >> >No problem >> > >> > >> >> And of

Re: [PHP] Re: skinning a cat

2008-09-02 Thread Robert Cummings
On Tue, 2008-09-02 at 07:52 +0200, Per Jessen wrote: > Lupus Michaelis wrote: > > > Robert Cummings a écrit : > > > >> Try running that on windows. > > > >No problem > > > > > > And of course, there's also Cygwin. *lol* A

Re: [PHP] Re: skinning a cat

2008-09-01 Thread Per Jessen
Lupus Michaelis wrote: > Robert Cummings a écrit : > >> Try running that on windows. > >No problem > > And of course, there's also Cygwin. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsub

Re: [PHP] Re: skinning a cat

2008-09-01 Thread Lupus Michaelis
Robert Cummings a écrit : Try running that on windows. No problem -- Mickaël Wolff aka Lupus Michaelis http://lupusmic.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub

Re: [PHP] Re: skinning a cat (was: Individual bulk e-mails - performance question)

2008-09-01 Thread Robert Cummings
On Mon, 2008-09-01 at 20:22 +0200, Per Jessen wrote: > Robert Cummings wrote: > > >> I'm probably old fashioned, but to me all that stuff is way overkill. > >> I also tend to think that synchronizing scripts is a job for the > >> shell, not PHP. > >> > >> lockfile=/var/lock//file > >> # clear ou

Re: [PHP] Re: skinning a cat

2008-09-01 Thread Per Jessen
Robert Cummings wrote: > The return value of creating the directory is either true for it > having been made or false for it having not been made. Therein lies > the atomicity. The OS will not return success if it was not made and > will not return failure if it was made. Ah, interesting. Thanks

Re: [PHP] Re: skinning a cat (was: Individual bulk e-mails - performance question)

2008-09-01 Thread Per Jessen
Robert Cummings wrote: >> I'm probably old fashioned, but to me all that stuff is way overkill. >> I also tend to think that synchronizing scripts is a job for the >> shell, not PHP. >> >> lockfile=/var/lock//file >> # clear out a lock older than 60mins >> find $lockfile -cmin +60 | xargs rm >>

Re: [PHP] Re: skinning a cat

2008-09-01 Thread Robert Cummings
On Mon, 2008-09-01 at 14:51 +0200, Per Jessen wrote: > Jochem Maas wrote: > > > Per Jessen schreef: > >> Jochem Maas wrote: > >> > lockfile=/var/lock//file > # clear out a lock older than 60mins > find $lockfile -cmin +60 | xargs rm > test ! -f $lockfile && ( > touch $loc

Re: [PHP] Re: skinning a cat (was: Individual bulk e-mails - performance question)

2008-09-01 Thread Robert Cummings
On Mon, 2008-09-01 at 09:44 +0200, Per Jessen wrote: > Robert Cummings wrote: > > >> >> #!/bin/sh > >> >> while true > >> >> do > >> >> > >> >> sleep 300 > >> >> done > >> > > >> > I accomplish the same with cron scripts by using locks with expiry. > >> > >> got an example? my cat skinn

Re: [PHP] Re: skinning a cat

2008-09-01 Thread Per Jessen
Jochem Maas wrote: > Per Jessen schreef: >> Jochem Maas wrote: >> lockfile=/var/lock//file # clear out a lock older than 60mins find $lockfile -cmin +60 | xargs rm test ! -f $lockfile && ( touch $lockfile rm -f $lockfile ) >>> wouldn't creating a dir be be

Re: [PHP] Re: skinning a cat

2008-09-01 Thread Jochem Maas
Per Jessen schreef: Jochem Maas wrote: lockfile=/var/lock//file # clear out a lock older than 60mins find $lockfile -cmin +60 | xargs rm test ! -f $lockfile && ( touch $lockfile rm -f $lockfile ) wouldn't creating a dir be better here? (with regard to atomicity) I haven't thought it throug

Re: [PHP] Re: skinning a cat

2008-09-01 Thread Jochem Maas
Colin Guthrie schreef: Jochem Maas wrote: either way, I've just learn't something new as far as shellscripting goes :-) apart from the xargs command ... that still does my head in (don't worry I'll look it up ... for the umpteenth time). find $lockfile -cmin +60 | xargs rm FWIW, it's nicer

Re: [PHP] Re: skinning a cat

2008-09-01 Thread Per Jessen
Jochem Maas wrote: >> lockfile=/var/lock//file >> # clear out a lock older than 60mins >> find $lockfile -cmin +60 | xargs rm >> test ! -f $lockfile && ( >> touch $lockfile >> >> rm -f $lockfile >> ) > > wouldn't creating a dir be better here? (with regard to atomicity) > I haven't thought it

Re: [PHP] Re: skinning a cat

2008-09-01 Thread Per Jessen
Colin Guthrie wrote: > Jochem Maas wrote: >> either way, I've just learn't something new as far as shellscripting >> goes :-) >> apart from the xargs command ... that still does my head in (don't >> worry I'll look it up ... for the umpteenth time). >>> >>> find $lockfile -cmin +60 | xargs rm > >

[PHP] Re: skinning a cat

2008-09-01 Thread Colin Guthrie
Jochem Maas wrote: either way, I've just learn't something new as far as shellscripting goes :-) apart from the xargs command ... that still does my head in (don't worry I'll look it up ... for the umpteenth time). find $lockfile -cmin +60 | xargs rm FWIW, it's nicer to do: $ find $lockfine

Re: [PHP] Re: skinning a cat

2008-09-01 Thread Jochem Maas
Per Jessen schreef: Robert Cummings wrote: #!/bin/sh while true do sleep 300 done I accomplish the same with cron scripts by using locks with expiry. got an example? my cat skinning skills need to be improved, the cat won't like it but screw the cat, right? [snip code] I implemente

[PHP] Re: skinning a cat (was: Individual bulk e-mails - performance question)

2008-09-01 Thread Per Jessen
Robert Cummings wrote: >> >> #!/bin/sh >> >> while true >> >> do >> >> >> >> sleep 300 >> >> done >> > >> > I accomplish the same with cron scripts by using locks with expiry. >> >> got an example? my cat skinning skills need to be improved, the cat >> won't like it but screw the cat, r