[M3devel] platform-independent kill process

Jay K jay.krell at cornell.edu
Mon Feb 21 04:49:34 CET 2011


Yes, please.

 

 

I'm not sure Terminate should return anything though.

In Win32 you would use TerminateProcess().

If you must have the exit code, that would be GetExitCodeProcess.
 Though the process might still be running and not have an orderly exit code.

Oh, and TerminateProcess does have to set the exit code.

In m3middle they set it to 1.

 

 

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


 

I don't think so. There was OS/2, BeOS, Amiga, MacOS < 10....

 

 

 - Jay

 
> Date: Sun, 20 Feb 2011 13:28:52 +0100
> From: wagner at elegosoft.com
> 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
> 
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20110221/689e8ad9/attachment-0002.html>


More information about the M3devel mailing list