[m-rev.] for review: use posix_spawn() instead of system() on MT grades

Julien Fischer juliensf at csse.unimelb.edu.au
Thu Jul 12 16:16:16 AEST 2007


On Thu, 12 Jul 2007, Peter Wang wrote:

> Estimated hours taken: 3
> Branches: main
>
> There are some problems with calling system() in multi-threaded programs on the
> Linux machines I have tested parallel mmc --make on.  On glibc 2.3.x machines
> there have been assertion failures while launching programs.  On a glibc 2.5.x
> machine the parent process got into infinite loops.
>
> This patch replaces system() in multithreaded grades by posix_spawn(), which
> doesn't seem to suffer the same problems.
>
> configure.in:
> runtime/mercury_conf.h.in:
> 	Check for availability of <spawn.h>, posix_spawn() and the environ
> 	global variable.
>
> library/io.m:
> 	Use posix_spawn() to implement io.call_system_code in multi-threaded
> 	C grades if available.
>

That's fine.

Julien.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list