Boost logo

Boost Users :

Subject: Re: [Boost-users] [process] Determine if a process is still running?
From: Boris Schaeling (boris_at_[hidden])
Date: 2010-09-06 16:54:58


On Mon, 06 Sep 2010 21:09:33 +0200, Allen Cronce <allenslists_at_[hidden]>
wrote:

> [...]I can see that boost::process supports obtaining a process ID. The
> question is can boost::process use this ID to determine if a given
> process, which was not launched as a child, is still running?

I assume you refer to Boost.Process 0.4 which has been released recently
and is currently heavily discussed on the Boost developer's list.

There is a proposal at
<http://www.highscore.de/boost/gsoc2010/process/appendices.html> how to
create a snapshot of currently running processes. The function
create_snapshot() wasn't finished in time though to ship it with 0.4.
There were some more ideas to filter processes returned by
create_snapshot() (eg. if you are only interested in processes owned by a
certain user). But I think in general this kind of function could help
you? You could then either iterate through the processes in the snapshot
or filter with the process ID directly?

Boris


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net