Hello,
I started a perl script as a service on a UNIX box. This service is connected to a socket number (datasource). So each time my PERL script is printing to STDOUT, this will be directly printing in the datasource. My problem is when the datasource has been desactivated (manually) and so that the connection to the socket has been lost. The only way I found to see this loss of connection is to use the SIGPIPE signal. But this one will only occur after the next print attempt. It could be a long time before I got it!! My script is not writting all the time in the datasource (it depends on a configurable parameters). Any idea on a way to see this loss of connection before trying to send a print to STDOUT (and so to the datasource)?
Thx in advance.