rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
* Re: subshell, interactive, login, etc
@ 1992-06-26 13:57 Matthew Farwell
  0 siblings, 0 replies; 9+ messages in thread
From: Matthew Farwell @ 1992-06-26 13:57 UTC (permalink / raw)
  To: malte; +Cc: rc

In article <9206261033.AA05577@dahlie.techfak.uni-bielefeld.de> you write:
>drazen@vlsi.cs.caltech.edu (D. Borkovic) writes:
>
>	Every rc sources .rcrc, but before doing this defines
>	certain variable (say $mode) to have certain values
>	depending on the mode. 
>
>If this is seriously considered to be incorporated, the recent rc version will
>be the last I use. There has never been an uglier, more resource waisting or
>more problem causing mechanism than that. I fought serious wars to convince
>csh users to switch to rc and now this !

Now that you come to mention it, I think it'd be the same for me too.

Dylan.

-- 
It is no coincidence that in no known language does the phrase 'As
pretty as an Airport' appear -- Douglas Adams


^ permalink raw reply	[flat|nested] 9+ messages in thread
* Re: subshell, interactive, login, etc
@ 1992-06-26 10:33 malte
  0 siblings, 0 replies; 9+ messages in thread
From: malte @ 1992-06-26 10:33 UTC (permalink / raw)
  To: rc

drazen@vlsi.cs.caltech.edu (D. Borkovic) writes:

	Every rc sources .rcrc, but before doing this defines
	certain variable (say $mode) to have certain values
	depending on the mode. 

If this is seriously considered to be incorporated, the recent rc version will
be the last I use. There has never been an uglier, more resource waisting or
more problem causing mechanism than that. I fought serious wars to convince
csh users to switch to rc and now this !

NEVER!

Malte.



^ permalink raw reply	[flat|nested] 9+ messages in thread
* Re: subshell, interactive, login, etc
@ 1992-06-26  3:57 Alan Watson
  0 siblings, 0 replies; 9+ messages in thread
From: Alan Watson @ 1992-06-26  3:57 UTC (permalink / raw)
  To: rc

I have a work-around for the problems with rsh; my `login shell' is
actually this rc script (called, unsurprisingly, rc-login):

#! /usr/users/alan/bin/rc
path = ( /usr/users/alan/bin $path )
exec rc -l $*


^ permalink raw reply	[flat|nested] 9+ messages in thread
* Re:  subshell, interactive, login, etc
@ 1992-06-26  1:41 Donn Cave
  1992-06-26  2:07 ` Scott Schwartz
  1992-06-26  8:10 ` Matthew Farwell
  0 siblings, 2 replies; 9+ messages in thread
From: Donn Cave @ 1992-06-26  1:41 UTC (permalink / raw)
  To: rc

| Every rc sources .rcrc, but before doing this defines
| certain variable (say $mode) to have certain values
| depending on the mode. 
|
| Then you can do in .rcrc:
|
|   switch ($mode){
|     case login;  . $home/rc/login;
|     case inter;  . $home/rc/inter;
|     case inter_login; . $home/rc/inter; . $home/rc/login;
|   }

I think something like this is needed, recognizing that as we find more
alternatives to the console login, properly initializing a new shell process
becomes more complex.

I think I recall that the original inspiration for this was an stty(1)
needed for a new xterm-invoked rc; this process will inherit environment
variables, so you wouldn't want to set "path" and so forth as if it were
a login, but you wouldn't want to have every interactive rc process run
stty(1).

The easiest and most general way to handle this one might be to use the
ENV concept from ksh.  Window managers and the like could set
ENV = $home/newtty.rc, and that script would be responsible for clearing
ENV so that further rc's aren't plagued by it.  ENV would normally not
be set, so rc scripts wouldn't source anything at all, but it would probably
be good to insure that by having non-interactive shells ignore ENV.

I've complained in the past that rshd invokes one's shell without the
leading minus sign that would make it a login shell, so .rcrc (or .profile,
or whatever) doesn't get run.  This makes it hard to invoke something
that's not in a system standard execution path, via rsh.

There may be no good way to fix that problem, but the best of the bad ways
might be to have rc expect a certain environment variable, and run .rcrc
if it's not there.

	Donn Cave, University Computing Services, University of Washington
	donn@cac.washington.edu


^ permalink raw reply	[flat|nested] 9+ messages in thread
* subshell, interactive, login, etc
@ 1992-06-26  0:26 D. Borkovic
  1992-06-26  0:42 ` Scott Schwartz
  1992-06-26  1:39 ` Chris Siebenmann
  0 siblings, 2 replies; 9+ messages in thread
From: D. Borkovic @ 1992-06-26  0:26 UTC (permalink / raw)
  To: rc


What do people out there think about this:

Every rc sources .rcrc, but before doing this defines
certain variable (say $mode) to have certain values
depending on the mode. 

Then you can do in .rcrc:

  switch ($mode){
    case login;  . $home/rc/login;
    case inter;  . $home/rc/inter;
    case inter_login; . $home/rc/inter; . $home/rc/login;
  }

Well, I did not think much about the values (inter_login looks
ugly), but I hope you get the idea.

Drazen


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~1992-06-26 14:07 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1992-06-26 13:57 subshell, interactive, login, etc Matthew Farwell
  -- strict thread matches above, loose matches on Subject: below --
1992-06-26 10:33 malte
1992-06-26  3:57 Alan Watson
1992-06-26  1:41 Donn Cave
1992-06-26  2:07 ` Scott Schwartz
1992-06-26  8:10 ` Matthew Farwell
1992-06-26  0:26 D. Borkovic
1992-06-26  0:42 ` Scott Schwartz
1992-06-26  1:39 ` Chris Siebenmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).