SIGPIPE and C question for Solaris

  • Follow


Fact:
I have a server implementaion in Java and running on Solaris platform.
That server generates continously all logs for events, exceptions and
informations in a flat text file.

Design idea:
I like to implement a parser programme (say, process A), written in C,
which will intermittently parse that generated log file and look for
"exception". Once any "exception" is encountered (parsed) by process A,
I like to send a SIGPIPE signal to another programme (say, process B,
also written in C).

Once process B receieves the SIGPIPE signal from process A, I'll
generate a message of occurance of the exception on the console screen.

Question:
1) Is this possible in Solaris unix ?

0
Reply akarui.tomodachi (29) 5/24/2006 5:19:53 AM

akarui.tomodachi@gmail.com wrote:
> Fact:
> I have a server implementaion in Java and running on Solaris platform.
> That server generates continously all logs for events, exceptions and
> informations in a flat text file.
>
> Design idea:
> I like to implement a parser programme (say, process A), written in C,
> which will intermittently parse that generated log file and look for
> "exception". Once any "exception" is encountered (parsed) by process A,
> I like to send a SIGPIPE signal to another programme (say, process B,
> also written in C).
>
> Once process B receieves the SIGPIPE signal from process A, I'll
> generate a message of occurance of the exception on the console screen.

It could be done with a shell script. Something like this:

tail -f flat.text.file | grep -i exception | awk '{ system("pkill -PIPE
process_B_written_in_C") }'

0
Reply Maxim 5/24/2006 7:05:26 AM


1 Replies
372 Views

(page loaded in 0.048 seconds)

Similiar Articles:













7/24/2012 7:15:24 AM


Reply: