From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from oldp.nmsu.edu ([128.123.26.31]) by hawkwind.utcs.utoronto.ca with SMTP id <24611>; Tue, 7 Jan 1997 14:55:44 -0500 Received: by oldp.nmsu.edu; id AA05252; Tue, 7 Jan 1997 12:55:14 -0700 Date: Tue, 7 Jan 1997 14:55:14 -0500 From: Alan Watson Message-Id: <9701071955.AA05252@oldp.nmsu.edu> To: rc@hawkwind.utcs.toronto.edu Subject: Re: intr and RC Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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);