From aa328192f6b09ad1c13038c719ac14db8daed121 Mon Sep 17 00:00:00 2001 From: simonmar Date: Tue, 23 Oct 2001 11:28:51 +0000 Subject: [PATCH] [project @ 2001-10-23 11:28:51 by simonmar] Set the return value of a main thread to NULL when it wouldn't otherwise be set to anything useful. --- ghc/rts/Schedule.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ghc/rts/Schedule.c b/ghc/rts/Schedule.c index 7cad587..b2fb90a 100644 --- a/ghc/rts/Schedule.c +++ b/ghc/rts/Schedule.c @@ -1,5 +1,5 @@ /* --------------------------------------------------------------------------- - * $Id: Schedule.c,v 1.101 2001/10/23 10:54:14 simonmar Exp $ + * $Id: Schedule.c,v 1.102 2001/10/23 11:28:51 simonmar Exp $ * * (c) The GHC Team, 1998-2000 * @@ -445,6 +445,7 @@ schedule( void ) pthread_cond_broadcast(&m->wakeup); break; case ThreadKilled: + if (m->ret) *(m->ret) = NULL; *prev = m->link; if (was_interrupted) { m->stat = Interrupted; @@ -477,6 +478,7 @@ schedule( void ) m->stat = Success; return; } else { + if (m->ret) { *(m->ret) = NULL; }; if (was_interrupted) { m->stat = Interrupted; } else { -- 1.7.10.4