On Wed, Apr 27, 2016 at 04:54:21PM +0800, Fei Jie wrote: > * tests/pause.c: New file. > * tests/pause.test: New test. > * tests/.gitignore: Add pause. > * tests/Makefile.am (check_PROGRAMS): Likewise. > (DECODER_TESTS): Add pause.test.
Thanks. I've applied a heavily edited version of this test. [...] > diff --git a/tests/pause.c b/tests/pause.c > new file mode 100644 > index 0000000..286b6ca > --- /dev/null > +++ b/tests/pause.c > @@ -0,0 +1,32 @@ > +#include "tests.h" > +#include <sys/syscall.h> > + > +#ifdef __NR_pause > + > +# include <signal.h> > +# include <stdio.h> > +# include <unistd.h> > + > +void > +sig_handler(int sig) > +{ > +} > + > +int > +main(void) > +{ > + signal(SIGALRM, sig_handler); What if this signal is blocked? > + alarm(3); Why 3? > + pause(); > + printf("pause() = ? ERESTARTNOHAND" > + " (To be restarted if no handler)\n"); -- ldv
pgpyEPCQkFI64.pgp
Description: PGP signature
------------------------------------------------------------------------------ Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________ Strace-devel mailing list Strace-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/strace-devel