Re: Handling race conditions

2003-03-10 Thread Michael Weber
Hmmm... Please allow me to combine two different sub-threads. >>> simran <[EMAIL PROTECTED]> 03/07/03 12:02AM >>> On Fri, 2003-03-07 at 13:51, R. Joseph Newton wrote: > Wiggins d'Anconia wrote: > > > > > In general this would be handled with a lock file. When the first > Good idea, but I thi

RE: Handling race conditions

2003-03-07 Thread Bakken, Luke
> Sorry to harp on this, but a lock file will not work in every > case. Shared > memory will not work. Every implementation of this results > in code that has > to: > > 1) check for lock > 2) lock The following should be atomic, and thus can be used for a **simple** locking mechanism: use Fc

RE: Handling race conditions

2003-03-07 Thread LoBue, Mark
> -Original Message- > From: Bakken, Luke [mailto:[EMAIL PROTECTED] > Sent: Thursday, March 06, 2003 4:47 PM > To: Michael Weber; [EMAIL PROTECTED] > Subject: RE: Handling race conditions > > > It sounds like you need two things: > > 1. A faster way of s

Re: Handling race conditions

2003-03-07 Thread simran
On Fri, 2003-03-07 at 13:51, R. Joseph Newton wrote: > Wiggins d'Anconia wrote: > > > > > In general this would be handled with a lock file. When the first > > instance of your script starts it would check for the lock file if it > > exists then just exit, if it doesn't then it opens a file (.lock

Re: Handling race conditions

2003-03-06 Thread simran
On Fri, 2003-03-07 at 13:51, R. Joseph Newton wrote: > Wiggins d'Anconia wrote: > > > > > In general this would be handled with a lock file. When the first > > instance of your script starts it would check for the lock file if it > > exists then just exit, if it doesn't then it opens a file (.lock

Re: Handling race conditions

2003-03-06 Thread R. Joseph Newton
Wiggins d'Anconia wrote: > > In general this would be handled with a lock file. When the first > instance of your script starts it would check for the lock file if it > exists then just exit, if it doesn't then it opens a file (.lock for > example) then does its processing, and then removes the lo

RE: Handling race conditions

2003-03-06 Thread david
Mark Lobue wrote: > > Check out "Network Programming with Perl". It can show you how to set up > an easy client-server system, where your mail server can call the client, > and > the client contacts the server through a socket. Even if many clients > fire at once, the socket connection forces s

RE: Handling race conditions

2003-03-06 Thread LoBue, Mark
> -Original Message- > From: Bakken, Luke [mailto:[EMAIL PROTECTED] > Sent: Thursday, March 06, 2003 4:47 PM > To: Michael Weber; [EMAIL PROTECTED] > Subject: RE: Handling race conditions > > > It sounds like you need two things: > > 1. A faster way of s

Re: Handling race conditions

2003-03-06 Thread Wiggins d'Anconia
Michael Weber wrote: Greetings, all! I have a mail server with swatch examining the log files looking for root.exe, /winnt/system32, etc. The idea is finding anyone who is scanning for root kits on my mail server gets blocked at the mail server and the firewall with an iptables command. What I

RE: Handling race conditions

2003-03-06 Thread Bakken, Luke
It sounds like you need two things: 1. A faster way of storing "seen" IPs. 2. A lock mechanism to keep perl processes queued up waiting to write new iptables entries. Having the perl script write a lock file as it is updating the iptables should be easy - subsequent scripts can wait to ensure tha

Handling race conditions

2003-03-06 Thread Michael Weber
Greetings, all! I have a mail server with swatch examining the log files looking for root.exe, /winnt/system32, etc. The idea is finding anyone who is scanning for root kits on my mail server gets blocked at the mail server and the firewall with an iptables command. What I have is swatch executi