From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from austin.cs.unc.edu ([152.2.128.87]) by hawkwind.utcs.utoronto.ca with SMTP id <24628>; Sat, 8 Mar 1997 23:24:55 -0500 Received: from rukbat.cs.unc.edu by austin.cs.unc.edu (8.6.10/UNC_10_05_96) id XAA09573; Sat, 8 Mar 1997 23:24:52 -0500 Received: from localhost by rukbat.cs.unc.edu (8.6.10/UNC_06_21_94) id XAA08439; Sat, 8 Mar 1997 23:24:51 -0500 Date: Sat, 8 Mar 1997 23:24:51 -0500 From: Stephen Tell To: Tom Culliton cc: rc@hawkwind.utcs.toronto.edu Subject: Re: rc, signals, readline, and Linux In-Reply-To: <199703050555.AAA13494@explorer2.clark.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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. Doing a similar history operation interactively (without -i) seems to work. I tried compiling rc 1.4 in the same environment with the same readline, and it does the same thing. Killing the looping rc -i and doing a postmortem gdb traceback suggests that the problem is probably readline-related: liriel;rc-1.5tjc; gdb ./rc core GDB is free software and you are welcome to distribute copies of it under certain conditions; type "show copying" to see the conditions. There is absolutely no warranty for GDB; type "show warranty" for details. GDB 4.16 (i586-unknown-linux), Copyright 1996 Free Software Foundation, Inc... Core was generated by `./rc -i'. Program terminated with signal 6, IOT trap/Abort. Reading symbols from /usr/lib/libreadline.so.2.0...done. Reading symbols from /lib/libc.so.5.3.12...done. Reading symbols from /lib/ld-linux.so.1...done. #0 0x4003c77c in ioctl () (gdb) bt #0 0x4003c77c in ioctl () #1 0x40016643 in get_tty_settings () #2 0x400169a1 in rltty_set_default_bindings () #3 0x400106fe in readline_default_bindings () #4 0x4001067b in readline_initialize_everything () #5 0x40010500 in rl_initialize () #6 0x4000f8bc in readline () #7 0x8050ff9 in rc_readline (prompt=0x0) at input.c:101 #8 0x8051834 in doit (execit=-1073743311) at input.c:300 Also, gcc makes these complaints while compiling. I haven't tried to figure out if they're worth worrying about or not. input.c: In function `doit': input.c:260: warning: argument `execit' might be clobbered by `longjmp' or `vfork' utils.c: In function `writeall': utils.c:69: warning: argument `buf' might be clobbered by `longjmp' or `vfork' utils.c:69: warning: argument `remain' might be clobbered by `longjmp' or `vfork' walk.c: In function `walk': walk.c:24: warning: argument `n' might be clobbered by `longjmp' or `vfork' System Info: Pentium 166 Red Hat Linux 4.0 (kernel 2.0.18) gcc version 2.7.2 libc 5.3.12 readline is readline-2.0-10.i386.rpm from the Red Hat distribution. Thanks for everyone's efforts. I'll soon try building at work, first on HP-UX 10.20 and 9.05, then SunOS, Solaris, Mips-Ultrix, and SGI. Steve Steve Tell tell@cs.unc.edu W: +1 919 962 1845 Research Associate, Computer Science Department, UNC@Chapel Hill. If you're determined to reinvent the wheel, at least try to invent a better one.