[M3devel] platform-independent kill process
Olaf Wagner
wagner at elegosoft.com
Mon Feb 21 07:49:08 CET 2011
Quoting "Coleburn, Randy" <rcolebur at SCIRES.COM>:
> 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?
Baucse that involves too many other sub-systems and components.
I'd like to keep the requirements for tests limited. When we test such
basic things like threading, we shouldn't have to assume that the
network subsystem and RPC are working well, too.
> This would be a "graceful" shutdown mechanism, rather than just
> killing the process at the OS level.
I'm not sure that it would work in the presence of threading problems,
but I may be mistaken there.
> I've used this technique before with other types of programs.
Nothing speaking against that, if your application needs all the
functionality anyway.
However, I think M3 should support a basic mechanism on process level.
Olaf
> 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