[comp.unix.questions] csh won't work on Suns...

greywolf@unisoft.UUCP (The Grey Wolf) (10/27/89)

I have a (somewhat modified) version of csh; taken from standard BSD
sources (yes, we have a source license).  Now all I've done is gone in
and modified a few things like some of the error messages, improved a bit
upon the ESC-completion and the ^D-listing and a few other neat nifty
goodies (which I will post to the net as context diffs if I can do it w/o
getting in trouble!).  It compiles on VAXen (its native source is VAXen),
and with a bit of hacking, a pyramid, and, though it will compile on a Sun,
running it is a bit of a trick.

( NOTE: I took the unadulterated csh sources and tried them, and, as I
suspected, it was nothing I had done.)

When I run the shell, it works fine, sources my .cshrc and everything is
just hunky-dory.  However, after I run a single non-builtin command, the
shell dies the next time I hit an interrupt, where it should be just longjmp()-
ing back to the beginning of process(), i.e. what normally happens when you
hit an interrupt.
If I run it with the -f flag, everything is just fine, and it stays so.
If I run it as a login shell, it sources my .cshrc, my .login, and then
when I hit an interrupt, it dies immediately.  I can find nothing which
would exhibit this behaviour.

Are some of the signals not being masked properly?
Is there a different/additional level of signal masking/blocking/fiddling
which SunOS 3.x/4.0.x do which I am unaware of?
"Has anyone else had this problem?" 8^}

If anyone can supply me with an answer, I'd be most appreciative.

advTHANKXance!

 " (terminal won't do umlauts!)
Roan Anderson, Software Engineer, System Test
UniSoft Corporation, Emeryville, CA
...!{apple,sun,amdahl,lll-lcc,pyramid,sequent,ucbvax,uunet}!unisoft!greywolf
-- 
"Insane I may be.  I am not stupid."	Antryg Windrose <the mad wizard>

greywolf@unisoft.UUCP (The Grey Wolf) (10/28/89)

In article <2543@unisoft.UUCP> I wrote:
Lots of stuff pertaining to csh not compiling.

I received a letter from one person explaining what was going on, but
it was under the assumption that I was using 4.2 sources.  Let me clarify
some things...

- The sources tried were modified AND untouched 4.3 VAXen sources, hacked
  just a wee bit to work on the pyramid (they had to be).  No, this is not
  a contradiction in terms, I compiled it twice -- once with my additions,
  once without (just to verify that my additions were not the main prob-
  lem).  I also had to use a generic printf.c as doprnt.c was VAX assem-
  bler (and therefore machine dependent).

- With some porting, normal csh (less filename completion) has been made
  to work under V3.2 on a 68k chip before.  Just not 4.3 sources for
  obvious reasons

- The 4.2 sources I tried to work with a LONG time ago (just when we'd
  made the move from 4.2 to 4.3) failed miserably, so the patches from the
  4.*1* version (yes, we had a 4.1 version of this modified shell, called
  D-shell, incidentally...(never mind the "distributed shell"...don't
  bother me with details!)), while they (mostly (with some syntax work)) worked
  to 4.2, were completely useless to the 4.3 release.  So I started from
  scratch on replacing some of the elements which used to be present...

Again, the problem (SunOS ONLY!)

It compiles with no errors.
When run as a login shell, the first interrupt kills the shell.  No savehist,
no logout, it just plain dies.

When run as a "normal" shell (i.e. what you get when you just type "csh"
at your prompt), interrupts are handled fine until you run a command which
is NOT a builtin command, after which point if you hit an interrupt the
shell dies.  [ In favour of redundancy to achieve clarity ]

When run as a "fast" shell (i.e. "csh -f") (well, the source comments
say "fast shell"), interrupts are handled fine until a file such as .cshrc
and .login is sourced, after which point interrupts will kill the shell.

IMPORTANT QUESTION:  Do SunOS signals require that the handler be re-
initialised after each invocation of the signal (is Sun that brain-dead?
I would prefer to think not; that's a SVism which (hopefully) has gone
away in V4 (haven't tried it yet)...), or did they (smartly) adapt to
BSD signals which *remember* what they're supposed to do?

   D  V

A Thankx A

  E     N
     C
-- 
"Insane I may be.  I am not stupid."	Antryg Windrose <the mad wizard>