Open System Services Programmer's Guide
#output Extraneous input -- terminating.
#output
#unframe
#return
] == end case
|2|
#output Expecting a process name -- terminating.
#output
#unframe
#return
] == end case
#set name [pname]
#chardel name 1 for 1
[#if not [#variableinfo /existence/ [name]^in^buf] |then|
#output Nothing to get rid of.
#output
#unframe
#return
] == end if
[#if [#processexists [pname]] |then|
#set prog [#fileinfo /file/ [#processinfo /programfile/
[pname]]]
[#if not [#match osstty [prog]] |then|
#output [pname] is not an OSSTTY process.
#output
#unframe
#return
] == end if
[#if [#emptyv [name]^status] |then|
sink [#stop [#variableinfo /process/ [name]^status]]
] == end if
sink [#stop [pname]]
] == end if
#pop [name]^in^buf [name]^out^buf [name]^prompt^buf [name]^need^prompt
#pop [name]^status
#unframe
?section tell routine
#frame
#push pname out^line
#if [#argument /value pname/ processname]
#chardel pname 1 for 1
[#if not [#variableinfo /existence/ [pname]^in^buf] |then|
#output Process not known.
#output
#unframe
#return
] == end if
#set [pname]^out^buf
#append [pname]^in^buf [#rest]
sink [#wait [pname]^out^buf [pname]^status]
#set [pname]^need^prompt -1
print $[pname]
[#if not [#variableinfo /existence/ [pname]^status] |then|
== print complained. Bail-out now
#unframe
#return
] == end if not variableinfo existence pname^status then
224 Managing I/O