Re: [Exim] [OT] Detecting closed exim -bS pipe in Perl

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Philip Hazel
Data:  
Para: Sheldon Hearn
CC: exim-users
Assunto: Re: [Exim] [OT] Detecting closed exim -bS pipe in Perl
On Fri, 31 Aug 2001, Sheldon Hearn wrote:

> Can anyone help me with detecting closure of a Perl pipe to exim -bS?
> My test case at the moment is the ommission of the trailing period.
> When I stop printing, none of $?, $! or fileno() help me detect that, in
> actual fact, the exim process is gone and exited with an error.


From "Perl in a Nutshell" (O'Reilly):

"Closing a pipe will wait for the process executing on the pipe to
complete, and it prevents the script from exiting before the pipeline
is finished. Closing a pipe explicitly also puts the status value of
the comand executing on the pipe into $?."

-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.