hi all,

as you know, since the 2.5 version there has been a simple check inside 
the code for process interactivity, in order to use the INT signal for 
changing the logging level. Currently, this test is done in a simple way 
through the use of -t STDIN (tests if STDIN is connected to terminal). 
There is also a very similar example in the Perl Cookbook:
http://docstore.mik.ua/orelly/perl/cookbook/ch15_03.htm

However, doing this test for STDIN (and also for STDOUT) is not entirely 
perfect, since if sec is run as a middle element of a pipeline, SIGINT 
is always overloaded, even though the pipeline might be connected to a 
terminal. For improving the check, I've implemented it in the POSIX way 
in the new version (described in the same Perl Cookbook recipe: 
http://docstore.mik.ua/orelly/perl/cookbook/ch15_03.htm).

Would the POSIX way be acceptable for all users? I suppose it can be 
safely assumed that the POSIX module and relevant functions (getpgrp and 
tcgetpgrp) are available on all modern platforms. As a sidenote, I've 
disabled the check on Windows platform where SIGINT can not be 
overloaded as a result.

kind regards,
risto

------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
Simple-evcorr-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/simple-evcorr-users

Reply via email to