summaryrefslogtreecommitdiffstats
path: root/tests/signal_test.cpp
Commit message (Collapse)AuthorAgeFilesLines
* support _POSIX_REALTIME_SIGNALSYabin Cui2014-12-081-1/+100
| | | | | Bug: 18489947 Change-Id: I2e834d68bc10ca5fc7ebde047b517a3074179475
* Fix mips signed/unsigned signal_test.cpp build breakage.Elliott Hughes2014-09-041-4/+4
| | | | Change-Id: I045ce017c0c51e1843193759a2eb6fc5b93e3867
* Don't mask out SA_RESTORER from sa_flags.Elliott Hughes2014-09-041-5/+11
| | | | | | | glibc doesn't do this, and we probably shouldn't either. Bug: 16703540 Change-Id: Id5b93c3782e34024a9916463348e8f3caff191bf
* Switch to g_ for globals.Elliott Hughes2014-05-141-4/+4
| | | | | | | That's what the Google style guide recommends, and we're starting to get a mix. Change-Id: Ib0c53a890bb5deed5c679e887541a715faea91fc
* Make SIGRTMIN hide the real-time signals we use internally.Elliott Hughes2014-04-301-0/+18
| | | | | | | | __SIGRTMIN will continue to tell the truth. This matches glibc's behavior (as evidenced by the fact that we don't need a special case in the strsignal test now). Change-Id: I1abe1681d516577afa8cd39c837ef12467f68dd2
* Restore sys_signame for LP64.Elliott Hughes2014-02-121-1/+1
| | | | | | mksh is using this, and we probably build as much BSD source as glibc source. Change-Id: I400d255a67f9614ca9e57090e3a2e49d2b10cba4
* Clean up sys_signame and sys_siglist a little.Elliott Hughes2014-02-121-0/+14
| | | | | | | | | | We don't need quite so much duplication because we already have a way to get the signal number from its name, and that already copes with the fact that the mips/mips64 numbers are different from everyone else's. Also remove sys_signame from LP64. glibc doesn't have this BSD-ism. Change-Id: I6dc411a3d73589383c85d3b07d9d648311492a10
* Fix up failing glibc tests.Christopher Ferris2013-10-291-19/+2
| | | | | | | | | | | | | | | | There is a known bug running clone with the CLONE_VM flag, so for host create an empty test. Change the expected output of the stdio test for a glibc difference. Change the pause test to use ScopedSignalHandler to setup/restore the SIGALRM handler. After this, running bionic-unit-tests-glibc passes for all tests. Bug: 11389824 Change-Id: Ib304eae4164115835a54991dfdca5821ecc3db5e
* Remove dependencies on obsolete __ARCH_WANT_SYSCALL_DEPRECATED system calls.Elliott Hughes2013-10-241-9/+13
| | | | | | (aarch64 kernels don't have these system calls.) Change-Id: I6f64075aa412f71520f2df71c3d69b647f91c1ca
* Fix sigaction(3) for 64-bit.Elliott Hughes2013-10-171-0/+41
| | | | | | | Also clean up <signal.h> and revert the hacks that were necessary for 64-bit in linker/debugger.cpp until now. Change-Id: I3b0554ca8a49ee1c97cda086ce2c1954ebc11892
* Switch sigpending over to rt_sigpending.Elliott Hughes2013-10-161-17/+41
| | | | Change-Id: I7b28984796b5fb343cfbcc47e0afc3a84293d417
* Fix sigsuspend to use rt_sigsuspend on all platforms.Elliott Hughes2013-10-151-0/+33
| | | | Change-Id: I981c1a66d35480d4457a0a08a1b042dac94daa5b
* Fix raise(3) so it works in signal handlers.Elliott Hughes2013-02-211-5/+33
| | | | | | | | We could special-case raise(3) in non-threaded programs, but the more conservative course is to make pthread_kill(3) work in signal handlers at the cost of a race shared by other C libraries. Change-Id: I59fb23d03bdabf403435e731704b33acdf3e0234
* Only have one copy of the kernel_sigset_t hack, and add more tests.Elliott Hughes2013-01-101-0/+24
| | | | Change-Id: I377522fcba6fb4b5fd2754ab15b091014bd7c16f
* Fix an off-by-one error in the sigset_t function error handling.Elliott Hughes2013-01-071-4/+4
| | | | | | | | | | | Spotted while running the tests on MIPS, where sigset_t is actually large enough. The bits in sigset_t are used such that signal 1 is represented by bit 0, so the range of signals is actually [1, 8*sizeof(sigset_t)]; it seems clearer to reword the code in terms of valid bit offsets [0, 8*sizeof(sigset_t)), which leads to the usual bounds checking idiom. Change-Id: Id899c288e15ff71c85dd2fd33c47f8e97aa1956f
* Use pthread_kill() in raise()Chris Dearman2012-12-101-0/+6
| | | | | | | raise() should use pthread_kill() in a pthreads environment. For bionic this means it should always be used. Change-Id: Ic679272b664d2b8a7068b628fb83a9f7395c441f
* Add argument checking to sigemptyset(3) and friends.Elliott Hughes2012-11-301-0/+97
You could argue that this is hurting people smart enough to have manually allocated a large-enough sigset_t, but those people are smart enough to implement their own sigset functions too. I wonder whether our least unpleasant way out of our self-inflicted 32-bit cesspool is to have equivalents of _FILE_OFFSET_BITS such as _SIGSET_T_BITS, so calling code could opt in? You'd have to be careful passing sigset_t arguments between code compiled with different options. Bug: 5828899 Change-Id: I0ae60ee8544835b069a2b20568f38ec142e0737b