summaryrefslogtreecommitdiff
path: root/test/setjmp/tst-vfork-longjmp.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-11-17 18:18:46 +0000
committerMike Frysinger <vapier@gentoo.org>2006-11-17 18:18:46 +0000
commit0113e25233e93d2ecae38c6849470b0b0deb2aee (patch)
treee8a146b7c1d3d2fe23ce937abbc21f6f9cb6de12 /test/setjmp/tst-vfork-longjmp.c
parenta86d1a42c8ddc7cc36f28921e2c0201b08138943 (diff)
fix from Paul Brook for ISO C violation in terms of handling of modifying automatic local variables between setjmp/longjmp
Diffstat (limited to 'test/setjmp/tst-vfork-longjmp.c')
-rw-r--r--test/setjmp/tst-vfork-longjmp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/setjmp/tst-vfork-longjmp.c b/test/setjmp/tst-vfork-longjmp.c
index d396f621f..c64e80559 100644
--- a/test/setjmp/tst-vfork-longjmp.c
+++ b/test/setjmp/tst-vfork-longjmp.c
@@ -66,7 +66,9 @@ int main(int argc, char *argv[])
const char *prog;
jmp_buf env;
sigjmp_buf sigenv;
- int cnt, max, ret;
+ int max;
+ /* values modified between setjmp/longjmp cannot be local to this func */
+ static int cnt, ret;
memset(&orig_mask, 0x00, sizeof(orig_mask));
ret = sigprocmask(SIG_BLOCK, NULL, &orig_mask);