Re: [tkined] Starting Jobs

Curt Sampson (cjs@portal.ca)
Wed, 13 May 1998 16:51:15 -0700 (PDT)

On Sun, 10 May 1998, Juergen Schoenwaelder wrote:

> You should not need to build such a loop. You should use fileevent
> to wait read from sockets asynchronously....

How do I time out the reads when I do this? When I connect to, say,
an SMTP server, the three way handshake may complete, but I may
not get a 220 from the server within a reasonable amount of time.
At that point I have to time out and mark the service as down.

> External programs are easy (at least on UNIX): You open a pipe to the
> program and you use fileevent to read the output from the program.

Again, I'd like to be able to deal with programs that can potentially
wedge themselves and never return, or take too long to produce
output. Also, how do I `widow' the ouput pipe to the program? That is,
how do I close it whilst still leaving the input pipe open so I can
send it an end of file and read any remaining output?

cjs

Curt Sampson cjs@portal.ca Info at http://www.portal.ca/
Internet Portal Services, Inc. Through infinite mist, software reverberates
Vancouver, BC (604) 257-9400 In code possess'd of invisible folly.

--
!! This message is brought to you via the `tkined & scotty' mailing list.
!! Please do not reply to this message to unsubscribe. To subscribe or
!! unsubscribe, send a mail message to <tkined-request@ibr.cs.tu-bs.de>.
!! See http://wwwsnmp.cs.utwente.nl/~schoenw/scotty/ for more information.