safely determining whether ProcessWrapper process is running

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

safely determining whether ProcessWrapper process is running

Peter Uhnak
Hi,

I feel like I am missing something obvious, but is there a _safe_ way to test if PW is still running?

If the process pointer for whatever reason is no longer valid (e.g. the image crashed / I closed image), then #isRunning results in crashing the image. Maybe this is a bug?

Thanks,
Peter
Reply | Threaded
Open this post in threaded view
|

Re: safely determining whether ProcessWrapper process is running

Guillermo Polito
Hi,

Sorry for the delay

On Sat, Jun 30, 2018 at 7:38 PM Peter Uhnák <[hidden email]> wrote:
Hi,

I feel like I am missing something obvious, but is there a _safe_ way to test if PW is still running?

I don't think so. ProcessWrapper primitives are not safe. If they are not called in the right order, of even, if one primitive fails and you call another primitive on the same object, it produces a segmentation fault.
 

If the process pointer for whatever reason is no longer valid (e.g. the image crashed / I closed image), then #isRunning results in crashing the image. Maybe this is a bug?

Thanks,
Peter


--

   

Guille Polito

Research Engineer

Centre de Recherche en Informatique, Signal et Automatique de Lille

CRIStAL - UMR 9189

French National Center for Scientific Research - http://www.cnrs.fr


Web: http://guillep.github.io

Phone: +33 06 52 70 66 13