OSDN Git Service

xexec() recursion limiter has to go after rebound or toy_init() zeroes it.
authorRob Landley <rob@landley.net>
Sun, 26 Oct 2014 18:34:33 +0000 (13:34 -0500)
committerRob Landley <rob@landley.net>
Sun, 26 Oct 2014 18:34:33 +0000 (13:34 -0500)
toys.h

diff --git a/toys.h b/toys.h
index 2e5c6b0..ed1fa81 100644 (file)
--- a/toys.h
+++ b/toys.h
@@ -132,10 +132,10 @@ extern struct toy_context {
   int toycount;            // Total number of commands in this build
   int signal;              // generic_signal() records what signal it saw here
   int signalfd;            // and writes signal to this fd, if set
-  int recursion;           // How many nested calls to toy_exec()
 
   // This is at the end so toy_init() doesn't zero it.
   jmp_buf *rebound;        // longjmp here instead of exit when do_rebound set
+  int recursion;           // How many nested calls to toy_exec()
 } toys;
 
 // Two big temporary buffers: one for use by commands, one for library functions