[m-dev.] trivial diff: fix minor bug in boehm_gc/if_*.c

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Feb 6 12:14:01 AEDT 2001


For both the main and release branches.

Estimated hours taken: 0.25

boehm_gc/if_mach.c:
boehm_gc/if_not_there.c:
	Fix a bug: it was not flushing stdout before calling execve().
	This resulted in the output being lost when stdout was buffered
	(e.g. when redirected to a file).

Workspace: /home/hydra4/public/test_mercury/test_dirs/hydra/mercury
Index: boehm_gc/if_mach.c
===================================================================
RCS file: /home/mercury1/repository/mercury/boehm_gc/if_mach.c,v
retrieving revision 1.4
diff -u -d -r1.4 if_mach.c
--- boehm_gc/if_mach.c	1999/09/16 20:04:31	1.4
+++ boehm_gc/if_mach.c	2001/02/06 01:09:29
@@ -13,6 +13,7 @@
     if (strcmp(OS_TYPE, "") != 0 && strcmp(argv[2], "") != 0
         && strcmp(OS_TYPE, argv[2]) != 0) return(0);
     printf("^^^^Starting command^^^^\n");
+    fflush(stdout);
     execvp(argv[3], argv+3);
     perror("Couldn't execute");
     
Index: boehm_gc/if_not_there.c
===================================================================
RCS file: /home/mercury1/repository/mercury/boehm_gc/if_not_there.c,v
retrieving revision 1.4
diff -u -d -r1.4 if_not_there.c
--- boehm_gc/if_not_there.c	1999/09/16 20:04:31	1.4
+++ boehm_gc/if_not_there.c	2001/02/06 01:09:38
@@ -16,6 +16,7 @@
         return(0);
     }
     printf("^^^^Starting command^^^^\n");
+    fflush(stdout);
     execvp(argv[2], argv+2);
     exit(1);
     

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list