Mercurial > hg > octave-shane > gnulib-hg
changeset 17247:fe6ac936b969
sigprocmask-tests: skip test if pid is unexpectedly large
At least mingw64 has 8-byte pid_t but only 4-byte long. Silent
truncation to int in printing a pid value with %d risks killing the
wrong process. But rather than try to futz with determining
the maximum pid_t, it is simpler to just cap things by realizing
that this test is already skipped on mingw64, so adding a sanity
check bounds comparison (and hard-coding the result rather than
dragging in headers for INT_MAX) is just as effective at avoiding
theoretical problems with no real loss in test coverage.
* tests/test-sigprocmask.c (main): Add range check.
Signed-off-by: Eric Blake <eblake@redhat.com>
author | Eric Blake <eblake@redhat.com> |
---|