[m-rev.] diff: fix bug with mmc --make

Julien Fischer juliensf at cs.mu.OZ.AU
Wed Apr 27 00:14:52 AEST 2005


Estimated hours taken: 3
Branches: main, release

Fix a bug reported by Michael Day.  When using mmc --make
to build .opt files the compiler wasn't responding to
SIGINT and SIGTERM.

compiler/make.module_target.m:
	Build intermodule-optimization interfaces
	in a forked process when when using mmc --make
	so that it responds to SIGINT and SIGTERM.

Julien.

Index: compiler/make.module_target.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/make.module_target.m,v
retrieving revision 1.31
diff -u -r1.31 make.module_target.m
--- compiler/make.module_target.m	26 Apr 2005 04:32:48 -0000	1.31
+++ compiler/make.module_target.m	26 Apr 2005 14:05:47 -0000
@@ -324,9 +324,14 @@
     % the Boehm GC retaining memory by scanning too much of the
     % Mercury stacks. If the compilation is run in a separate
     % process, it is also easier to kill if an interrupt arrives.
-    %
+    % We do the same for intermodule-optimization interfaces
+    % because if type checking gets overloaded by ambiguities
+    % it can be difficult to kill the compiler otherwise.
     io__set_output_stream(ErrorStream, OldOutputStream, !IO),
-    ( ModuleTask = compile_to_target_code ->
+    (
+        (ModuleTask = compile_to_target_code
+        ; ModuleTask = make_optimization_interface)
+     ->
         call_in_forked_process(call_mercury_compile_main([ModuleArg]),
             invoke_mmc(ErrorStream, ArgFileName, AllOptionArgs ++ [ModuleArg]),
             Succeeded, !IO)

--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list