1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-10 06:47:55 -08:00
openbsd-src/games
cheloha fb669f8977 grdc(6): implement timeout with alarm(3)
grdc(6) has an optional argument indicating a timeout in seconds.
For example, one could do:

	$ grdc 60

to to tell grdc(6) to run for sixty seconds and then exit gracefully.

As implemented, however, the timeout may occur too early or too late
if the system clock is reset with settimeofday(2).

To avoid this problem we can instead use alarm(3) and a signal handler
to implement the timeout.  alarm(3) is unaffected by settimeofday(2).
2020-06-06 17:03:16 +00:00
..
adventure Remove unused confirm() and datime() functions. 2017-06-23 12:56:25 +00:00
arithmetic convert to unsigned variables to avoid some overflows. 2018-12-27 17:27:23 +00:00
atc When system calls indicate an error they return -1, not some arbitrary 2019-06-28 13:32:41 +00:00
backgammon User count checks have been compiled out since 1998, get rid of them. 2017-07-11 14:32:16 +00:00
banner More fixes from David Fifield: 2018-10-16 20:06:42 +00:00
battlestar rm lists of hereditary wizards and bad users to ensure level playing field 2019-05-09 20:19:22 +00:00
bcd Be more specific regarding which encoding this simulator generates: 2019-09-08 22:43:46 +00:00
boggle If boardspec doesn't consist entirely of lower case letters, there will be 2016-09-12 20:11:10 +00:00
bs Remove a few too early pledge(2)s on games/ and apply them a little bit later 2018-08-24 11:14:49 +00:00
caesar patch from <tleguern at bouledef dot eu> to support backward rotation, 2019-05-15 15:59:24 +00:00
canfield During our refactor with tedu@ tb@ and myself we moved the score file to the 2018-08-24 11:31:17 +00:00
cribbage - General changes: 2016-03-07 12:07:55 +00:00
factor In 32 bits sqrt(val) + 1 can overflow, so some big primes still 2016-09-01 10:48:38 +00:00
fish - General changes: 2016-03-07 12:07:55 +00:00
fortune no need to declare "extern optarg" and "extern optind" 2020-02-14 19:17:33 +00:00
gomoku ANSIfy gomoku(6) and change a char* to u_char* 2016-01-08 21:38:33 +00:00
grdc grdc(6): implement timeout with alarm(3) 2020-06-06 17:03:16 +00:00
hack When system calls indicate an error they return -1, not some arbitrary 2019-06-28 13:32:41 +00:00
hangman When system calls indicate an error they return -1, not some arbitrary 2019-06-28 13:32:41 +00:00
hunt no need to declare "extern optarg" and "extern optind" 2020-02-14 19:17:33 +00:00
mille When system calls indicate an error they return -1, not some arbitrary 2019-06-28 13:32:41 +00:00
monop When system calls indicate an error they return -1, not some arbitrary 2019-06-28 13:32:41 +00:00
morse - General changes: 2016-03-07 12:07:55 +00:00
number - General changes: 2016-03-07 12:07:55 +00:00
phantasia When system calls indicate an error they return -1, not some arbitrary 2019-06-28 13:32:41 +00:00
pig eaktway eviouspray; 2019-05-12 06:07:36 +00:00
pom Consolidate printf(3) calls at the end of main(). 2017-12-24 22:12:49 +00:00
ppt - General changes: 2016-03-07 12:07:55 +00:00
primes Straightforward conversion to strtonum. Slight change of behavior in that 2017-11-02 10:37:11 +00:00
quiz Remove a few too early pledge(2)s on games/ and apply them a little bit later 2018-08-24 11:14:49 +00:00
rain Some basic code maintenance in games/ 2016-01-07 16:00:31 +00:00
random - General changes: 2016-03-07 12:07:55 +00:00
robots no need to declare "extern optarg" and "extern optind" 2020-02-14 19:17:33 +00:00
sail When system calls indicate an error they return -1, not some arbitrary 2019-06-28 13:32:41 +00:00
snake When system calls indicate an error they return -1, not some arbitrary 2019-06-28 13:32:41 +00:00
tetris When system calls indicate an error they return -1, not some arbitrary 2019-06-28 13:32:41 +00:00
trek The game is playable without the need to access any files therefore we can 2018-08-09 17:51:22 +00:00
wargames a few depend:-related thingies that were still in. 2019-12-21 21:39:59 +00:00
worm Remove a few too early pledge(2)s on games/ and apply them a little bit later 2018-08-24 11:14:49 +00:00
worms Drop "rpath" from pledge(2) after ncurses initialization. 2018-08-06 06:27:32 +00:00
wump Move a badly positioned parenthesis that caused nonsensical movement 2018-12-20 09:55:44 +00:00
Makefile
Makefile.inc Build most of games/ with -Werror-implicit-function-declaration. 2015-12-28 20:55:55 +00:00