Unix Programming - SIGPIPE and C question for Solaris

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > May 2006 > SIGPIPE and C question for Solaris





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author SIGPIPE and C question for Solaris
akarui.tomodachi@gmail.com

2006-05-24, 1:20 am

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 ?

Maxim Yegorushkin

2006-05-24, 7:16 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") }'

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com