]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
setcontext: Clarify termination when uc_link is the null pointer.
authorThomas Schwinge <thomas@codesourcery.com>
Tue, 17 Jul 2012 08:05:55 +0000 (10:05 +0200)
committerThomas Schwinge <thomas@codesourcery.com>
Tue, 17 Jul 2012 08:05:55 +0000 (10:05 +0200)
ChangeLog
manual/setjmp.texi
stdlib/tst-makecontext.c

index f6c1cc5a400e707036c2abe63c2154d98a94db8e..fce46177e4d72cb4417a414fd7d44caf723b9436 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2012-07-17  Thomas Schwinge  <thomas@codesourcery.com>
+           Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
+
+       * manual/setjmp.texi (setcontext): Clarify normal process
+       termination when uc_link is the null pointer.
+       * stdlib/tst-makecontext.c (cf): Exercise this: remove explicit
+       exit call.
+
 2012-07-16  Andreas Schwab  <schwab@linux-m68k.org>
 
        * stdlib/bug-getcontext.c (do_test): Don't test FE_ALL_EXCEPT in
index a5a7ce6523eca04ce339b676fd54b1b7c59abc89..f13ac7b00e0a1cfe092d3eb0afd0b696fa9a8fc8 100644 (file)
@@ -354,7 +354,8 @@ specified parameters passed.  If this function returns execution is
 resumed in the context which was referenced by the @code{uc_link}
 element of the context structure passed to @code{makecontext} at the
 time of the call.  If @code{uc_link} was a null pointer the application
-terminates in this case.
+terminates normally with an exit status value of @code{EXIT_SUCCESS}
+(@pxref{Program Termination}).
 
 Since the context contains information about the stack no two threads
 should use the same context at the same time.  The result in most cases
index 31859007d03f81a38f5918968071c5de3f6e4ce5..eb6e89bda8a705a42bd13cf727a5784b2fd0e5d6 100644 (file)
@@ -35,7 +35,9 @@ cf (int i)
       printf ("i %d thr %d\n", i, thr);
       exit (1);
     }
-  exit (0);
+
+  /* Since uc_link below has been set to NULL, setcontext is supposed to
+     terminate the process normally after this function returns.  */
 }
 
 int