Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!linus!philabs!cmcl2!seismo!brl-tgr!tgr!control@almsa-1.ARPA From: control@almsa-1.ARPA (William Martin) Newsgroups: net.unix Subject: Setting variables for a running process Message-ID: <10893@brl-tgr.ARPA> Date: Tue, 21-May-85 16:55:00 EDT Article-I.D.: brl-tgr.10893 Posted: Tue May 21 16:55:00 1985 Date-Received: Fri, 24-May-85 07:10:25 EDT Sender: news@brl-tgr.ARPA Lines: 38 A query regarding running under 4.2 BSD, and using the standard "sh" shell: Is there any way I can change my terminal type (setting the TERM variable) while I am inside some other process? If I can do a "!sh" or push to a lower fork or child process, and then run the shell and do a TERM=xyz and export TERM, that only has an effect for that child process. Is there a way to do it so that it changes the variable in the parent process, where I am working? For example, I get on a terminal not my usual one, forget to do a TERM type setting, and then run "send", our message-sending routine which is part of the mmdf mail system we use here. I compose the message and then want to use "vi" to edit it. When I run "vi", the screen display is all messed up because the TERM type is wrong. I can :q out of vi, and use ed instead, which is what I do, but I wonder if there is something I can do at that point to reset my terminal type without saving the text data, aborting "send", and then resetting and starting over? That is, terminate the mangled "vi", do that resets the terminal type to the correct one, and then restart "vi" on the message text? (I would hope that there is some generic method to do this -- I'm not looking for specific help regarding this particular local mail tool.) On a TOPS-20 machine, I can be running a process, give a "push" command which spawns a lower-level running fork of the exec, and at that lower level give terminal and environment-modification commands that are effective AFTER I subsequently issue a "pop" command which takes me back up to where I was when I did that "push". Is there an equivalent in UNIX? Maybe something that has some sort of "global" effect, or something like the way you can do ". shellscript" to get the shellsript commands to affect your own personal running shell? (This would reach UP an arbitrary number of levels.) Will Martin ARPA/MILNET: wmartin@almsa-1.ARPA UUCP/Usenet: seismo!brl-bmd!wmartin