timeoutafter secs prog [ args ... ]
timeoutafter execs prog (the "server"), without
changing PIDs.
If secs seconds elapse without data being available on
the "server" side (i.e. without prog writing to stdout),
the connection is closed.
Be warned that the ioconnect process could interfere with prog's SIGCHILD handling, if any. A well-designed prog will always check the PIDs of the children it spawns and waits for, though, so it should not be a problem in most cases.
tcpserver 0 25 timeoutafter 600 qmail-smtpdensures that no SMTP connection stays up more than 10 minutes.