hello guys,
I have another question related to Named Pipe.
I have made a "/usr/local/etc/SEC_Log_Pipe " and hang it with SEC so that SEC can read input text from it;

*cmd1*: /perl -w /usr/local/sbin/sec.pl --conf=xxx.cfg --conf=yyy.cfg --conf=zzz.cfg -input=/usr/local/etc/SEC_Log_Pipe -intevents/

I need to log some information also in a log file upon successful execution of one of my defined rule and i wanted to use the same pipe for writing it.

I wrote the following script <sec_log_out.pl>for writing;

/open(NAMEDPIPE, "+< $filename") or die "fifo  $!";
$| = 1;

while (<//NAMEDPIPE>)
{
        print $_;
//}
/
and executed it as a background process like this;
*cmd2*: /perl sec_log_pipe.pl >> /var/log/sec_monitor.log &
/
but 2 seperate processes are created. /(lsof/ //usr/local/etc/SEC_Log_Pipe/ shows both processes). One processes is created by SEC i.e. <cmd1> for taking Input and another by <cmd2> for logging out data to a log file. Since, I always execute cmd2 after cmd1 so, logging is working fine, but SEC is not able to take any input unless I kill the process (cmd2).

action statement in my rule set is;
    type=Single
    ptype=RegExp
    patter=blah,blah
    desc=$0
/action= write /usr/local/etc/SEC_Log_Pipe [%u] %s/

Is there a good way to handle read/write operations through named pipe?
Thanks in advance,
--

Kind Reagrds/Mit freundlichen Grüßen

M Haris Farooque

------------------------------------------------------------------------------
What happens now with your Lotus Notes apps - do you make another costly 
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus 
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
_______________________________________________
Simple-evcorr-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/simple-evcorr-users

Reply via email to