[comp.sys.m6809] Remote terminal in Level II

df1b+@andrew.cmu.edu (David R. Fulmer) (06/30/87)

I'm trying to set up a remote terminal to work through /t2 on a CoCo III, 128K,
level II system.  I have the following commands in my /dd/startup file:

	xmode /t2 baud=7
	date t>/t2
	ex shell i=/t2

Whenever I do this though the original shell doesn't go away.  It waits for
me to send it a signal, then it wakes back up.  I though the ex should've taken
care of that!  I tried ex shell i=/t2& first but that didn't work right.
I want to original shell to die, go away, and give up its memory.  Things
work fine if I use

	xmode /t2 baud=7
	date t>/t2
	shell i=/t2&

and type ex on the CoCo after startup is done running.  It seems whenever I
stick ex in a shell script that it terminates the shell script, but not
the shell?

If anyone out ther has successfully set up a remote terminal this way,
please leave me know.  I don't want to have to type ANYTHING (exept DOS) on
the CoCo.


Thanks,

Dave Fulmer
!seismo!andrew.cmu.edu!df1b
df1b+@andrew.cmu.edu (arpa)
r750df1b@cmccvb (bitnet)

knudsen@ihwpt.ATT.COM (mike knudsen) (07/06/87)

> I'm trying to set up a remote terminal to work through /t2 on a CoCo III, 128K,
> level II system.  I have the following commands in my /dd/startup file:

> 	xmode /t2 baud=7
> 	date t>/t2
> 	ex shell i=/t2

> Whenever I do this though the original shell doesn't go away.  It waits for
> me to send it a signal, then it wakes back up.  I though the ex should've taken
> care of that!

I believe this is yet another limitation of the way OS9 executes
shell script files.  Your bootup shell creates a sub-shell to
run the startup file.  Your EX gets rid of that subshell,
but the parent shell is still alive & well as you noted.

This same problem has kept me from putting CHD and CHX commands
in startup files.  They work great for the rest of the file script
but apply only to the subshell, so you're back to the defaults
after the file is finished.

UN*X fortunately has a special '.' operator that means
"don't run this in a subshell; do it exactly as if I were
typing it on /TERM."
Maybe OS9/68K has, or will get, this feature -- not holding
my breath for 6809 version, but would love it.
-- 
Mike J Knudsen    ...ihnp4!ihwpt!knudsen  Bell Labs(AT&T)
    Delphi: RAGTIMER    CIS: <memory failure, too many digits>
		"Just say NO to MS-DOS!"

phil@osiris.UUCP (Philip Kos) (07/07/87)

In article <1789@ihwpt.ATT.COM>, knudsen@ihwpt.ATT.COM (mike knudsen) writes:
> I believe this is yet another limitation of the way OS9 executes
> shell script files.  Your bootup shell creates a sub-shell to
> run the startup file....
> 
> UN*X fortunately has a special '.' operator that means
> "don't run this in a subshell; do it exactly as if I were
> typing it on /TERM."...

Actually, Mike, this is a shell command and not a UN*X operator.  It's even
a different built-in in different shells (csh, for example, maps it to the
verb "source").  "Running" a shell script, i.e. starting up a text file as
a process, is *always* handled by UN*X by starting the named (or default)
"shell" with the text as stdin.  Anything else has to be done by the shell
itself.

If the bootup shell were hacked to do things like this, the procedure
could probably be changed so that this was possible.  I'm not really fami-
liar with OS9 so I can't say if this is really possible or not; I mainly
wanted to correct a mis-impression of UN*X and thereby suggest a solution.

> -- 
> Mike J Knudsen    ...ihnp4!ihwpt!knudsen  Bell Labs(AT&T)
>     Delphi: RAGTIMER    CIS: <memory failure, too many digits>
> 		"Just say NO to MS-DOS!"

...!decvax!decuac!\                                               Phil Kos
  ...!seismo!mimsy!aplcen!osiris!phil           The Johns Hopkins Hospital
...!allegra!/                                                Baltimore, MD

"The all-weather breakfast." - F. Theater