Text File

Aucbvax.5150 fa.unix-wizards utzoo!decvax!ucbvax!unix-wizards Thu Nov 12 22:13:19 1981 Sleep vs. alarm/pause >From cbosg!dale@Berkeley Thu Nov 12 21:35:35 1981 The problem described re. sleep using alarm/pause is real and is slightly worse than that described. In the standard system a user process using both alarms and sleeps can truely get messed up. This can be fixed by appropriate changes in the library interface routines. But the race of the alarm going off before the pause can be done is still there. We have fixed this in some systems by making pause return immediately if there is no alarm pending. This has the unfortunate side effect of not being able to use pause to wait for another signal unless an alarm is set first. But it seems that this is better in most applications than having a pause that may never return. The best bet may, as has already been suggested, be to use the Berkeley signal stuff.

----------------------------------------------------------------- gopher://quux.org/ conversion by John Goerzen <jgoerzen@complete.org> of http://communication.ucsd.edu/A-News/

This Usenet Oldnews Archive article may be copied and distributed freely, provided:

1. There is no money collected for the text(s) of the articles.

2. The following notice remains appended to each copy:

The Usenet Oldnews Archive: Compilation Copyright (C) 1981, 1996 Bruce Jones, Henry Spencer, David Wiseman.