[ale] re: timeout for read
Geoffrey Myers
geof at denali.abraxis.com
Tue Oct 29 20:54:26 EST 1996
}Is there any shell command in bash that will allow me to grab keystrokes other
}than read. I would like to do a read command but give a time limit of
}60 seconds. Ne1 know how. Or does ne1 have a C program that will take
}the time length on the command line and return the input on STDOUT?
I would think it would be pretty straight forward in C to fork and exec
a process that is going to expect the input and the parent could have the
timer. If the timer expires, the parent could signal the child to go away.
If the timer doesn't expire, the child takes the input and signals the
parent that it has input. You could get real fancy with pipes between the
two processes for communication and passing info. Really, choose your
favorite IPC...
}
}
}Thanks,
}Christopher Fowler
}------------------------------------------------------------------------
}To contact me: cfowler at www.topform.com
}Computer Software, INC. * 303 Research Drive * Norcross, GA 30092
}Phone: (770) 448-1484 * FAX: (770) 448-3949
}http://www.topform.com
}------------------------------------------------------------------------
}
}
}
--
Until later:
Geoffrey Myers geof at abraxis.com
Opinions expressed by me are mine, all mine, only mine.....
More information about the Ale
mailing list