+2003-01-21 Thomas Pfaff <tpfaff@gmx.net>
+
+ * winsup.api/pthread/cancel9.c: Wait in mainthread until child
+ process has terminated.
+
2003-01-14 Thomas Pfaff <tpfaff@gmx.net>
* winsup.api/pthread/cancel10.c: New test.
#include "test.h"
+static pid_t pid;
+
static void *Thread(void *punused)
{
int res;
- pid_t pid = fork ();
+ pid = fork ();
assert (pid != -1);
switch (pid)
{
int main (void)
{
+ int res;
+
void * result;
pthread_t t;
assert (pthread_cancel (t) == 0);
assert (pthread_join (t, &result) == 0);
assert (result == PTHREAD_CANCELED);
+ assert (waitpid (pid, &res, 0) != -1);
return 0;
}