[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-readline] readline spins up at 100% CPU when put into background fr
[Bug-readline] readline spins up at 100% CPU when put into background from shell script
Wed, 12 Sep 2012 00:18:12 +0000
I have a problem which I believe is in readline. The problem shows up in the
readline library, and is in two different programs each of which use readline.
I'm not sure what version of readline we have. I see:
and in /usr/include/readline/readline.h:
/* Hex-encoded Readline version number. */
#define RL_READLINE_VERSION 0x0600 /* Readline 6.0 */
#define RL_VERSION_MAJOR 6
#define RL_VERSION_MINOR 0
What happens is the following. I write a wrapper script for, say, gnuplot,
let's make it real simple for analysis' sake. The actual script does more than
this, but this script exhibits the problem I'm having and is very simple:
Easy peasy! When this script is run, then put into the background with
Control-Z, readline goes "berserk" taking up 100% of a CPU trying to read a
keystroke. A trace trap shows this:
C read_line, FP=7fffffffd1e0
C com_line, FP=7fffffffd1f0
C main, FP=7fffffffd3e0
This only happens when gnuplot is backgrounded from a script. If I run gnuplot
binary from the command line directly it does not exhibit this problem.
Can someone on this list comment or suggest steps I could take to solve this?
For now I have a workaround to call
exec /usr/local/tools/gnuplot-4.4.3/bin/gnuplot.real "$@"
But I am using "trap" in my script to get signals and calling exec defeats all
my signal handling traps.
✇ Lawrence Livermore National Laboratory
Bldg-453 Rm-4024, Mail Stop L-557
7000 East Avenue, Livermore, CA, 94550, USA
☎ (office) (925) 423-9605
☎ (fax) (925) 423-6961
Information Management & Graphics Grp., Services & Development Div., Integrated
Computing & Communications Dept.
(opinions expressed herein are mine and not those of LLNL)
|[Prev in Thread]
||[Next in Thread]|
- [Bug-readline] readline spins up at 100% CPU when put into background from shell script,
Cook, Rich <=