rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
From: culliton@srg.af.mil (Tom Culliton x2278)
To: rsalz@osf.org
Cc: rc@hawkwind.utcs.toronto.edu
Subject: Re: RC on HP9000/710?
Date: Fri, 16 Apr 1993 10:48:02 -0400	[thread overview]
Message-ID: <9304161048.aa00934@ceres.srg.af.mil> (raw)

I encountered exactly the same thing with SCO Unix for about the same
reason.  The smaller NSIG was being used top size the array and then
signals that were off the end of the array where stomping memory.  At
the time Byron said that others folks had the same problem with HP/UX. 
Here's the message:

> From srg.srg.af.mil!archone.tamu.edu!byron Fri May 22 04:30:33 1992
> From: Byron Rakitzis <byron@archone.tamu.edu>
> To: culliton@srg.srg.af.mil
> Subject: sigmsgs.c
> Date: Fri, 22 May 1992 02:33:32 -0500
> Status: RO
> 
> Here's the problem: SCO has different NSIG's and mksignal simply
> goes for the last NSIG it sees in /usr/include/sys/signal.h.
> 
> I don't know an easy answer to this conundrum, except to advise
> SCO users to build this thing by hand; there is already another
> OS out there with a braindead signal.h: HP/UX, and I think people
> there get the idea also.
> 
> I dunno, any ideas?
> 
> BTW, I assume that rc with a healthy sigmsgs.c runs ok, right?

I don't think that using the signal numbers as indices is a problem but
at the time, I did suggest a range check be done.  The right way to do
this is probably at compile time using #if and #error so that you get
an error when you try to build the code and don't add any run time
overhead.  For example in walk.c there is a #if that looks like this: 
(this is the one that screwed up SCO)

#if !defined(NOJOB) && defined(SIGTTOU) && defined(SIGTTIN) && defined(SIGTSTP)

If we added:

#if (SIGTTOU >= NUMOFSIGNALS) || (SIGTTIN >= NUMOFSIGNALS) || (SIGTSTP >= NUMOFSIGNALS)
#error mksignal failed, you may have to build sigmsg.c by hand
#endif

This wouldn't be so hard to track down.  The other thing that would
help is a note in config.h or the README to the effect that SCO-ODT and
HP/UX have this problem.

Tom


             reply	other threads:[~1993-04-16 15:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-04-16 14:48 Tom Culliton x2278 [this message]
  -- strict thread matches above, loose matches on Subject: below --
1993-04-16 15:16 Tom Culliton x2278
     [not found] <Sm@cerberus.bhpese.oz.au>
1993-04-16 11:49 ` rsalz
1993-04-15 14:05 rsalz
1993-04-15 23:33 ` Scott Merrilees

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=9304161048.aa00934@ceres.srg.af.mil \
    --to=culliton@srg.af.mil \
    --cc=rc@hawkwind.utcs.toronto.edu \
    --cc=rsalz@osf.org \
    /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).