Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Jan 1995 17:34:03 +0100 (MET)
From:      erik@stack.urc.tue.nl (Erik Manders)
To:        hackers@FreeBSD.org
Cc:        marcz@stack.urc.tue.nl, unix@stack.urc.tue.nl
Subject:   a [t]csh oddity.
Message-ID:  <199501271634.RAA08316@skynet.stack.urc.tue.nl>

next in thread | raw e-mail | index | archive | help
 A friend of mine was porting tcsh to 2.0R and was irritated when,
after typing './tcsh' he got '-/tcsh' as process name from ps. He
chased down the bug (took all afternoon) and finally traced it to
csh.c. He also tried 'csh' with identical results. This is apparently
a historical 'feature' since FreeBSD csh, SunOS 4.1.1 csh, SVR2
csh and tcsh all suffer the same effect. SVR4 does not, as far as
we know.  The diff for removing the 'feature' from csh is enclosed.
Our question is: is this a deliberate feature, a bug nobody ever
bothered to chase down, or something else? This assignment takes
place when setting signals for an interactive shell.

*** csh.c.bak	Fri Jan 27 17:01:16 1995
--- csh.c	Fri Jan 27 17:02:36 1995
***************
*** 448,454 ****
--- 448,456 ----
      shpgrp = getpgrp();
      opgrp = tpgrp = -1;
      if (setintr) {
+ #ifdef WHAT_IS_THIS
  	**argv = '-';
+ #endif
  	if (!quitit)		/* Wary! */
  	    (void) signal(SIGQUIT, SIG_IGN);
  	(void) signal(SIGINT, pintr);




  Erik Manders				 		erik@stack.urc.tue.nl
--
"Any sufficiently advanced technology is indistinguishable from magic."
	--Arthur C. Clarke

Finger me at erik@blade.stack.urc.tue.nl for my PGP public key.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199501271634.RAA08316>