rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
From: Alan Watson <alan@oldp.nmsu.edu>
To: rc@hawkwind.utcs.toronto.edu
Subject: Re: intr and RC
Date: Tue, 7 Jan 1997 14:55:14 -0500	[thread overview]
Message-ID: <9701071955.AA05252@oldp.nmsu.edu> (raw)

I've looked at this for a little while and these diffs seems to work
for me on

    SunOS charon 5.5 Generic sun4u sparc SUNW,Ultra-1
    
when compiled with c89 and without -lbsd or -lreadline.

There seem to be two things to get right: the behaviour on interrupts
with and without a handler. I think this does the right thing, but rc
signals are pretty much Greek to me.

Regards,

Alan

*** config.h.orig   Tue Jan  7 12:39:57 1997
--- config.h    Tue Jan  7 12:39:46 1997
***************
*** 130,140 ****
  #define DEFAULTPATH "/usr/bsd", "/usr/sbin", "/usr/bin", "/bin", "."
  #endif
  
! #ifdef sun        /* Used on SunOS 4.1.1 */
! #define PROTECT_ENV
! #undef DEFAULTPATH
! #define DEFAULTPATH "/usr/ucb", "/usr/bin", "."
  #endif
  
  /*
   * Suggested settings for HP300 running 4.3BSD-utah (DWS):
--- 130,151 ----
  #define DEFAULTPATH "/usr/bsd", "/usr/sbin", "/usr/bin", "/bin", "."
  #endif
  
! #ifdef sun
! #ifdef __SVR4     /* Used on Solaris */
!   #ifndef SYSVR4
!   #define SYSVR4
!   #endif
!   #define NOSIGCLD
!   #define SVSIGS
!   #define PROTECT_ENV
!   #undef DEFAULTPATH
!   #define DEFAULTPATH "/usr/ucb", "/usr/bin", "."
! #else     /* Used on SunOS 4.1.1 */
!   #define PROTECT_ENV
!   #undef DEFAULTPATH
!   #define DEFAULTPATH "/usr/ucb", "/usr/bin", "."
  #endif
+ #endif
  
  /*
   * Suggested settings for HP300 running 4.3BSD-utah (DWS):
*** input.c.orig    Tue Jan  7 11:03:30 1997
--- input.c Tue Jan  7 12:52:00 1997
***************
*** 137,144 ****
            } else
  #endif
                {
!               long /*ssize_t*/ r = rc_read(istack->fd, inbuf + 2, BUFSIZE);
!               sigchk();
                if (r < 0) {
                    uerror("read");
                    rc_exit(1);
--- 137,148 ----
            } else
  #endif
                {
!               long /*ssize_t*/ r;
!               do {
!                   errno = 0;
!                   r = rc_read(istack->fd, inbuf + 2, BUFSIZE);
!                   sigchk();
!               } while (r < 0 && errno == EINTR);
                if (r < 0) {
                    uerror("read");
                    rc_exit(1);


             reply	other threads:[~1997-01-07 19:55 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-01-07 19:55 Alan Watson [this message]
  -- strict thread matches above, loose matches on Subject: below --
1997-01-13  1:33 Scott Schwartz
1997-01-12 23:39 Scott Schwartz
1997-01-13  0:52 ` David Luyer
1997-02-11 13:57   ` Markus Friedl
1997-01-12 23:17 Byron Rakitzis
1997-01-09 21:59 Scott Schwartz
1997-01-08 20:01 Mark K. Gardner
1997-01-09 11:09 ` Tim Goodwin
1997-01-08  7:45 Bengt Kleberg
1997-01-07 18:00 Alan Watson
1997-01-07 17:03 Mark K. Gardner
1997-01-07 17:16 ` Scott Schwartz
1997-01-07 17:46 ` Paul Haahr
1996-12-31 21:53 Mark K. Gardner
1996-12-31 22:01 ` Soren Dayton

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=9701071955.AA05252@oldp.nmsu.edu \
    --to=alan@oldp.nmsu.edu \
    --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).