Re: 4gl timer
Posted in 1997
In article <5do2oh$3ka@cssun.mathcs.emory.edu>, Jonathan Leffler <johnl@informix.com> writes > >I4GL uses SIGALRM internally while dealing with input -- you can't pre-empt >this use in your code, I'm afraid. > >Using SIGQUIT is interesting -- not usual, but it will work very nicely. >Good thinking! > >What I'd do is have the I4GL code kick off a child (using C code, not the >RUN statement) and record the process ID of its child. The I4GL code calls >a function which sends a signal to the child indicating 'Hi, start me a >timeout' (not SIGALRM, not SIGTERM or SIGHUP; maybe SIGINT), so the child >can then sleep for so many seconds, and if it wakes up because of a >timeout, the child would send a signal back to the I4GL code (probably >still SIGQUIT) to tell it that the timeout has occurred. Note that the >child can use SIGALRM because it is not I4GL code and is not affected by >I4GL's use of SIGALRM. > How about using SIGUSR1 and SIGUSR2 the "user defined" signals? -- David Williams