bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gawk's inet hanging?


From: Jeff Chua
Subject: gawk's inet hanging?
Date: Fri, 6 Nov 2009 06:07:40 +0800

I'm trying put gawk inet connection to the local smtp port and would like it
to detect error conditions, but don't know how.

Here's the code ...

awk '
        BEGIN {
                GAWK_SOCK_RETRIES = 2;  # this doesn't seem to do anything
                serv = "/inet/tcp/0/localhost/25";
                print "help" |& serv;
       }
'


It works when sendmail is running. But when I stop sendmail, running the
above code just hangs without reporting any error. Running "telnet localhost
25" returns error right away.

Thanks,
Jeff


reply via email to

[Prev in Thread] Current Thread [Next in Thread]