var sock

proc main
var pid line inp 

spawn child pid
if pid=0; call input_proc; endif
set sock [connect "192.136.18.2" 25]
printnl "SOCK: " sock
in sock
onint from child intproc
while 1
	input line
	if $eof; exit 0; endif
	printnl line
wend
endproc


proc intproc
out sock
printnl [tail $int_mesg]
out "STDOUT"
endproc


proc input_proc
var line

while 1
	input line;  interrupt $ppid with line
wend
endproc
