[M3devel] platform-independent kill process

Coleburn, Randy rcolebur at SCIRES.COM
Mon Feb 21 05:13:54 CET 2011


Olaf:

If the regression tests are written in Modula-3, why not use Network Objects to provide an interface that can be called to tell the program to stop?  

This would be a "graceful" shutdown mechanism, rather than just killing the process at the OS level.

I've used this technique before with other types of programs.

Regards,
Randy

-----Original Message-----
From: Olaf Wagner [mailto:wagner at elegosoft.com] 
Sent: Sunday, February 20, 2011 7:29 AM
To: m3devel at elegosoft.com
Subject: [M3devel] platform-independent kill process

I've been thinking a bit about the hanging tests problem in our regression
test framework. I'd like to provide a simple utility to start a program
with time supervision. But as far as I can see, Modula-3 does not provide
a platform-independent way of terminating a process. Of course, on Unix
I can send signals; but what would I do on Windows? A quick scan of the
win32 interfaces in m3core hasn't brought up anything, but I might
have looked for the wrong texts.

Could we easily extend the Process interface e.g. by

   PROCEDURE Terminate( p: T ): ExitCode RAISES TerminationException

?
Any opinions about that? Different interface suggestions?
Rather create ProcessExtras than extending a `standard' interface?

We currently only have to consider Unix and Windows, or are there
other active flavours of OSs to care for?

Olaf
-- 
Olaf Wagner -- elego Software Solutions GmbH
                Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany
phone: +49 30 23 45 86 96  mobile: +49 177 2345 869  fax: +49 30 23 45 86 95
    http://www.elegosoft.com | Geschäftsführer: Olaf Wagner | Sitz: Berlin
Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194




More information about the M3devel mailing list