[YLUG] borken pipe
Patrick Dupre
pd520 at york.ac.uk
Wed Jun 18 23:09:07 BST 2008
Thank.
> On Wed Jun 18, 2008 at 13:17:40 +0100, Patrick Dupre wrote:
>
>> How can I detect a broken pipe ?
>
> Via testing for SIGPIPE ?
>
> Something like this:
>
> #!/usr/bin/perl -w
>
> use strict;
> use warnings;
>
> $SIG{'PIPE'} = 'PIPE'
> sub PIPE {
> print "Detected broken pipe.\n";
> exit;
> }
>
> #
> # your perl code here ..
> # .. and still here.
> #
>
>
> Search google for "perl signals" + pipe / sigpipe and you should find
> more specific advice.
>
> Steve
>
--
---
==========================================================================
Patrick DUPRÉ | |
Department of Chemistry | | Phone: (44)-(0)-1904-434384
The University of York | | Fax: (44)-(0)-1904-432516
Heslington | |
York YO10 5DD United Kingdom | | email: pd520 at york.ac.uk
==========================================================================
More information about the York
mailing list