Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

os9exec setenv broken?

98 views
Skip to first unread message

Bob Devries

unread,
Aug 22, 2011, 2:13:01 AM8/22/11
to
Hi all,

I'm having a problem setting environment variables from a script file
(like startup).

for example,
setenv PATH=/DD/CMDS:/DD/USR/CMDS
this works from the command line, but not from a script such as
startup.

is there a workaround?
It appears that you can't (legally) change environment variables from
within a programme; there's no function call for that. There's
getenv() but no setenv().

regards, Bob Devries
Dalby, QLD, Australia

Bob Devries

unread,
Aug 22, 2011, 2:16:43 AM8/22/11
to

Umm, sorry, I forgot to mention specifically that I'm using the OS-9
emulator OS9Exec in the above post.

Regards, Bob Devries
Dalby, QLD, Australia

Bob Devries

unread,
Aug 23, 2011, 5:30:22 PM8/23/11
to
After a day of experimentation with OS9EXEC, I have found that none of
the built-in commands can be used from within a script file. So I
can't even set up a ram disk in the startup file, nor can I set any
environment variables.

I also found that the page pause function (using tmode pause) does not
work correctly. The page stops as you'd expect, but the output of the
programme is still printed to the bottom line of the display.

Is there anywhere to report these findings? There appears to be no
mailing list or active forum available.

Martin Gregorie

unread,
Aug 24, 2011, 7:50:03 PM8/24/11
to
On Tue, 23 Aug 2011 14:30:22 -0700, Bob Devries wrote:

> After a day of experimentation with OS9EXEC, I have found that none of
> the built-in commands can be used from within a script file. So I can't
> even set up a ram disk in the startup file, nor can I set any
> environment variables.
>

When I last used it, 4 years ago, all that stuff worked though I admit I
was using the EFFO shell, not the standard OS9 shell and the
documentation was somewhat misleading. This isn't surprising: I've used
nothing but the EFFO shell for the last 10-15 years.

When I dropped out of the project then, I'd intended to return within a
year, but stuff happens... At that point Beat Forster was the main active
developer - have you tried to contact him?

> I also found that the page pause function (using tmode pause) does not
> work correctly. The page stops as you'd expect, but the output of the
> programme is still printed to the bottom line of the display.
>

That was the case when I last used it: Beat was using a proprietary non-
standard console setup (can't remember its name) that wasn't available to
me. As a result I wanted to make it possible to run os9exec as a daemon
and use something equivalent to ssh/telnet/kermit as a terminal client
but had more pressing business to attend to so never did much about that.

I had os9exec more or less working from the Linux command line with
'xterm' as the OSK terminal definition but I can't remember if I modified
that terminal definition. I still have a todo list that documents my
major problems, which were essentially all in the terminal i/o area: the
guts of os9exec seems to work pretty well regardless of whether its using
the Linux filing system or an RBSH disk image mapped to a Linux file.

> Is there anywhere to report these findings? There appears to be no
> mailing list or active forum available.
>

If you haven't contacted Beat, try doing so and, in case he needs
motivation, you could mention that I'm thinking that I should get
involved again. The stuff I needed to work on is now pretty much where I
needed it to be, but took a lot longer than expected to get it that way,
so I can again pay attention to os9exec.

If you need his e-mail address, contact me off list using info in my sig.

--
martin@ | Martin Gregorie
gregorie. | Essex, UK
org |

N Morrison

unread,
Aug 25, 2011, 12:00:15 PM8/25/11
to
On Aug 23, 2:30 pm, Bob Devries <devries....@gmail.com> wrote:
> After a day of experimentation with OS9EXEC, I have found that none of
> the built-in commands can be used from within a script file. So I
> can't even set up a ram disk in the startup file, nor can I set any
> environment variables.

Maybe it's the Unix shell situation? When you run a script it runs in
a separate process. When the process ends, nothing is changed.

There is a way around this in Unix:

"Normally, when a shell discovers that the command to execute is a
shell script, it would spawn a child shell and that child would read
in the script as commands. If the shell script is preceded by a dot
and a space, however, the shell stops reading the current script or
commands and starts reading in the new script or commands without
starting a new subshell."

Bob Devries

unread,
Aug 25, 2011, 5:17:26 PM8/25/11
to
On Aug 26, 2:00 am, N Morrison <another1...@gmail.com> wrote:

> Maybe it's the Unix shell situation? When you run a script it runs in
> a separate process. When the process ends, nothing is changed.
>
> There is a way around this in Unix:

As far as I know, this is not supposed to be a problem in OS9. Most if
not all commands which are in the startup file will leave their
results in place, which allows commands like SETENV to work at
startup.

Regards, Bob Devries
Dalby, QLD, Australia

0 new messages