rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
* rc, signals, readline, and Linux
@ 1997-03-05  5:55 Tom Culliton
  1997-03-09  4:24 ` Stephen Tell
  0 siblings, 1 reply; 3+ messages in thread
From: Tom Culliton @ 1997-03-05  5:55 UTC (permalink / raw)
  To: rc

8-) 8-) 8-) Anybody who has been paying attention will know that I've
been fighting a battle with the combination mentioned above.  Both rc
and readline like to play with signals, readline always acts like a
slow system call when the signal hanlder returns, and leaves things
FUBAR'ed if it doesn't. 8-) 8-) 8-)

So my big **** eating grin might tell you something. 8-)  Thats right,
unless I've overlooked something really dumb, it's fixed!!!  This fix
probably applies to anyone using readline, especially on Posix type
systems.  Basically it entails ALWAYS treating readline as a slow
system call, retrying the read on EINTR, and doing some deep secret
readline magic in the rc signal catcher.  I'll try to post a context
diff against virgin rc-1.5betadev-1 as soon as I make a few posix-isms
conditional.

Tom (one very tired and happy hacker)


^ permalink raw reply	[flat|nested] 3+ messages in thread
* Re: rc, signals, readline, and Linux
@ 1997-03-09  5:31 Tom Culliton
  0 siblings, 0 replies; 3+ messages in thread
From: Tom Culliton @ 1997-03-09  5:31 UTC (permalink / raw)
  To: culliton, tell; +Cc: rc

> On Wed, 5 Mar 1997, Tom Culliton wrote:

> > So my big **** eating grin might tell you something. 8-)  Thats right,
> > unless I've overlooked something really dumb, it's fixed!!!  This fix
>
> I've been trying to get rc going on my new linux box recently; 
> Tom's patches definitely help a lot.  SIGINT definitely works properly with
> readline now.  This is enough improvement that I've installed it as my
> default. 
>
> All is not quite perfect, however.
>
> "make trip" hang on the first line in the history section:
>
> history=/tmp/hist.$pid prompt='' echo 'history=()' | $rc -i
>
> No history file is created in /tmp, and "./rc -i" is looping burning
> cpu cycles.   

Yeah, I reported this earlier.  You must ahve either missed the
message or it was one of the ones that bounced from the list.  For
some reason this problem occurs with readline under Linux if you don't
link statically.  Go back and look at my configuration patches which
include the proper link switches to make this happen.  What is needed
is somthing like:

	LDFLAGS= -static -lreadline -ltermcap

	:
	:

	rc: $(OBJS)
		$(CC) -o $@ $(OBJS) $(LDFLAGS)

With this rc should trip flawlessly.  I spent a bunch of time fiddling
with it, saw the same stack traces, but decided in the end that it had
already cost enough brain cells, and I really didn't give a hoot if
the binary was statically linked or not.  I'll leave that one for
someone else, who has more experience with dynamic linking under Linux
to solve. ;-) ;-) ;-)

Tom


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1997-03-09  5:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-03-05  5:55 rc, signals, readline, and Linux Tom Culliton
1997-03-09  4:24 ` Stephen Tell
1997-03-09  5:31 Tom Culliton

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