Sync
This commit is contained in:
parent
6f050a029e
commit
776bba907c
3887 changed files with 59894 additions and 7280 deletions
27
Task/Fork/NetRexx/fork.netrexx
Normal file
27
Task/Fork/NetRexx/fork.netrexx
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
/* NetRexx */
|
||||
options replace format comments java crossref symbols binary
|
||||
|
||||
runSample(arg)
|
||||
return
|
||||
|
||||
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
method runSample(arg) private static
|
||||
|
||||
do
|
||||
pb = ProcessBuilder([String ''])
|
||||
env = pb.environment()
|
||||
currentuser = String env.get('USER')
|
||||
command = Arrays.asList([String 'ps', '-f', '-U', currentuser])
|
||||
pb.command(command)
|
||||
pp = pb.start()
|
||||
ir = BufferedReader(InputStreamReader(pp.getInputStream()))
|
||||
line = String 'Output of running' command.toString() 'is:'
|
||||
loop label w_ until line = null
|
||||
say line
|
||||
line = ir.readLine()
|
||||
end w_
|
||||
catch iox = IOException
|
||||
iox.printStackTrace()
|
||||
end
|
||||
|
||||
return
|
||||
Loading…
Add table
Add a link
Reference in a new issue