rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
From: jeremy@sw.oz.au (Jeremy Fitzhardinge)
To: rc@hawkwind.utcs.toronto.edu
Subject: Porting rc to Linux
Date: Sun, 21 Mar 1993 22:43:18 -0500	[thread overview]
Message-ID: <9303220343.AA11618@chao.sw.oz.au> (raw)

I didn't anticipate any problems, but there were a few:

Linux has real ansi headers in /usr/include, so it wasn't necessary to use
the face prototypes in proto.h, and it was undesireable to do so since
the compiler whined about inconsistencies.  I added a new configuration
flag GOODHEADERS that makes proto.h include system headers rather than
define prototypes.

Rc has the "mksignal" script to extract signal names and descriptions from
/usr/include/sys/signal.h.  This didn't work on linux for two reasons:
	/usr/include/sys/signal.h just includes <linux/signal.h> (in
	the kernel source tree).

	linux/signal.h doesn't have comments after each #define describing
	the signal.
I just made mksignal look at a fake signal.h when running under Linux.
A better solution might be to use the sys_siglist array which has
the name to number mapping of the signal names, if not a text description.

They were the easy problems, that prevented compilation.  The subtle
one was in which.c.  Under linux gid_t is defined as an
unsigned short, and getgroups() takes a pointer to gid_t as its second
argument. rc uses an array of ints for the group list, so it got a list
of bad groups.  This meant that rc wouldn't exec a file that was group
executable only and the group was in the user's supplimentary list.

When searching the path, why does rc try to double guess the kernel
by testing the permissions itself rather than just trying to exec it?
And if it has to (whatis), why doesn't it just use the access system
call rather than doing it for itself in rc_access?  The comment
says "does the right thing for group-executable files" - does access()
not work correctly on other Unicies in this case?

	J


             reply	other threads:[~1993-03-22  3:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-03-22  3:43 Jeremy Fitzhardinge [this message]
1993-03-22  4:16 Paul Haahr

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9303220343.AA11618@chao.sw.oz.au \
    --to=jeremy@sw.oz.au \
    --cc=rc@hawkwind.utcs.toronto.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).