rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
* whatis bug
@ 1997-08-18  2:30 Jason Tyler
  0 siblings, 0 replies; only message in thread
From: Jason Tyler @ 1997-08-18  2:30 UTC (permalink / raw)
  To: rc; +Cc: j

Instead of printing "$1 not found", whatis says "$1: Permission denied"
if $path($#path)^/$1 exists but is not executable. The obvious fix is:

*** builtins.c.old	Tue Jul  8 01:43:52 1997
--- builtins.c	Mon Aug 18 12:05:36 1997
***************
*** 342,348 ****
  		}
  		if (!f) {
  			found = FALSE;
! 			if (errno != ENOENT)
  				uerror(av[i]);
  			else
  				fprint(2, "%s not found\n", av[i]);
--- 342,348 ----
  		}
  		if (!f) {
  			found = FALSE;
! 			if (errno != ENOENT && errno != EACCES)
  				uerror(av[i]);
  			else
  				fprint(2, "%s not found\n", av[i]);

However, I don't know the source well enough to predict what unwanted
side-effects this might cause; can anyone suggest a better solution?

jason

-- 
OBrc: fn test-r { >[2=] <$1 }	# fails on named pipes


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1997-08-18  3:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-08-18  2:30 whatis bug Jason Tyler

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).