Basic Examples (7)
Basic Examples
(7)
Check if a process is currently running using a process ID:
In[1]:=
Out[1]=
True
———
Check if a process is running by name (results may be platform-dependent):
In[1]:=
Out[1]=
True
In[2]:=
Out[2]=
False
In[3]:=
Out[3]=
True
———
Check if a is running:
In[1]:=
process=StartProcess[$SystemShell]
Out[1]=
ProcessObject
In[2]:=
Out[2]=
True
Close the process:
In[3]:=
KillProcess[process]
Verify that it’s no longer running:
In[4]:=
Out[4]=
False
———
Check if a is running:
In[1]:=
obj=SessionSubmit[ScheduledTask[1+1,{5}]]
Out[1]=
In[2]:=
Out[2]=
True
Check again after it has finished:
In[3]:=
Pause[5];[obj]
Out[3]=
False
———
Check if a stream is open:
In[1]:=
str=StringToStream["abc efg hij"]
Out[1]=
InputStream
In[2]:=
Out[2]=
True
In[3]:=
Close[str]
Out[3]=
String
In[4]:=
Out[4]=
False
———
Use string patterns:
In[1]:=
Out[1]=
True
In[2]:=
Out[2]=
True
———
Use an association of properties:
In[1]:=
Out[1]=
True
In[2]:=
Out[2]=
False
Scope (7)
Scope
(7)
Properties and Relations (2)
Properties and Relations
(2)
Possible Issues (6)
Possible Issues
(6)