diff options
author | Eric Blake <eblake@redhat.com> | 2012-12-31 16:51:29 -0700 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2012-12-31 16:59:00 -0700 |
commit | e62439a54a711bbaeee685fc058ebc876cc7650e (patch) | |
tree | ba1bbbad512c4488a73fb9bf0c3c0867eb121726 /lib | |
parent | d4d4aa2ee0869eebacf0322d35dcd12b576eeef3 (diff) | |
download | gnulib-e62439a54a711bbaeee685fc058ebc876cc7650e.tar.gz |
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>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions