[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] is there a logging module available?



At 14:40 -0400 4/21/99, Chris Nandor wrote:
>
> Well, the idea behind using the semaphore file is that you can flock the
> semaphore file.

Sigh.  It's been a while since I read the whole thing through.  I meant as
an example of how to do semaphore files.

'Twould be nice if flock worked cross platform.

Assuming all apps used it of course...

> You still can't do that in MacPerl.  You can check for the
> existence of a file instead, and unlink the file when you are done, but if
> one process for some reason does not unlink it, you're in trouble.

Well, yeah. But if it's your logging program in your CGI script, if one of
the processes does not unlink the file it's usually because something
crashed (or you have a bug :-) and you can fix that.

Or check how old the file is an delete it yourself. Or raise a red flag. Or
something.

At least with a semaphore, you're in charge.
---
      |\      _,,,---,,_       Vicki Brown <vlb@cfcl.com>
ZZZzz /,`.-'`'    -.  ;-;;,_   Journeyman Sourceror: Scripts & Philtres
     |,4-  ) )-,_. ,\ (  `'-'  P.O. Box 1269  San Bruno  CA  94066
    '---''(_/--'  `-'\_) http://www.cfcl.com/~vlb  http://www.macperl.org

===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org