OsProcesses
Description
This class provides helpful OsProcess-related query methods
API
#all - all executing processes sorted by pid
#current - current VAST process
#named: - native processes whose command name matches the <String> argument
#pid: - Answer the native process objects for the <Integer> pid id
#spawned - active vast subprocesses
Examples
"Array of all native os processes sorted by pid"
self assert: [OsProcesses all allSatisfy: [:p | p isNativeProcess]].
"Get the current VAST process"
self assert: [OsProcesses current isVastProcess].
"Get the processes that match the provided name"
self assert: [(OsProcesses named: '*abt.exe') notEmpty].
"Get the processes by pid"
self assert: [(OsProcesses pid: OsProcesses current pid) == OsProcesses current].
"Array of subprocesses of VAST sorted by pid"
self assert: [OsProcesses spawned allSatisfy: [:p | p isNativeProcess]]
Class Methods
<details> all
<pre><code> Answer an array of all pid sorted processes running in this system at the time this call was made.
Answers:
<Array> of <OsNativeProcess and subclasses>
</code></pre> </details>
<details> current
<pre><code> Answer this VAST process
Answers:
<OsVastProcess>
</code></pre> </details>
<details> named:
<pre><code> Answer an <Array> of all native process objects whose command name matches @aString pattern. The pattern uses the same semantics as the receiver
of EsString>>match: If no such processes current exist, then an empty <Array> is answered.
Example: Find all processes named abt.exe
OsProcesses named: '*abt.exe'
Arguments:
aString - <EsString> command name pattern to match
Answers:
<Array> of <OsNativeProcess>
</code></pre> </details>
<details> pid:
<pre><code> Answer the native process objects for @aPid If the pid does not exist in the system, then nil will be answered
Arguments:
aPid - <Integer>
Answers:
<OsNativeProcess> or nil
</code></pre> </details>
<details> spawned
<pre><code> Answer an array of pid sorted subprocesses of VAST that were active at the time this call was made
Answers:
<Array> of <OsNativeProcess and subclasses>
</code></pre> </details>
Instance Methods
None
Last modified date: 07/07/2022