Welcome to iraf.net Thursday, March 28 2024 @ 04:15 PM GMT


 Forum Index > Help Desk > Systems New Topic Post Reply
 Nasty behavior of control-C in Fedora 8
   
ncaon
 04/18/2008 05:11PM (Read 6111 times)  
++---
Junior

Status: offline


Registered: 10/30/2005
Posts: 29
Hello,I would like to report a problem I have with control-C after my Linux PC has been upgraded to Fedora 8. This is not really an Iraf problem, but I would be interested to know if somebody else has experienced it, or if anybody has a clue on what may be happening or can suggest some tests to help find out a solution or workaround.
I did a search on Google, but found nothing.In short, while before, under Red Hat Linux Enterprise 4, control-C used to kill the task or script that was running, and return the Iraf prompt, now under Fedora 8 it kills iraf itself.This is what happens in Fedora 8
[code:1:d8ea9c53bd]
[I start Iraf and get the prompt]
ecl>
[I press ctrl-C]
ecl> ERROR: interrupt!!!
ecl>
ncaon@cherne>
[at this point I press Enter (just once) ... ]
ecl> ERROR: use `logout' to log out of the CL
ecl> ERROR: use `logout' to log out of the CL
ecl> ERROR: use `logout' to log out of the CL
ecl> ERROR: use `logout' to log out of the CL
ecl> ERROR: use `logout' to log out of the CL
ecl> ERROR: use `logout' to log out of the CL
ecl> ERROR: use `logout' to log out of the CL
ecl> ERROR: use `logout' to log out of the CL
ecl>
[I press Enter again ...]
ncaon@cherne>
[Iraf has been killed]
[/code:1:d8ea9c53bd]
While with RHEL4 (on another machine)
[code:1:d8ea9c53bd][Start Iraf, get the prompt, press ctrl-C several times]
ecl> ERROR: interrupt!!!
ecl> ERROR: interrupt!!!
ecl> ERROR: interrupt!!!
ecl> ERROR: interrupt!!!
ecl> ERROR: interrupt!!!
ecl> ERROR: interrupt!!!
ecl>
[All is OK, I can continue to use Iraf][/code:1:d8ea9c53bd]The same is also true for IDL (and perhaps for other applications as well): with RHEL 4 one could just interrupt a running IDL program and carry on using IDL, now with Fedora 8 control-C kills IDL (but leaves sort of a zombie IDL process around).I typed "stty -a" in both machines to check if there was any obvious difference in the terminal settings, but the output looks identical.
I am running iraf v2.12.2a. It does not matter whether the PC with Fedora 8 has a 32-bit or a 64-bit CPU.Thanks very much
Nicola

 
Profile Email
 Quote
fitz
 04/18/2008 05:11PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
Hi Nicola,I brought up an FC8 machine and confirmed that the interrupt handling is the same as before. It is interesting that the interrupt works once but then starts acting like you've been typing an EOF char. After 8 such EOF attempts like this the system just quits, but the CL definitely isn't seeing a Ctrl-C at that point.Any chance that your window manager, desktop environment, or terminal window is somehow intercepting the Ctrl-C for another purpose (e.g. a clipboard copy command?) One way to test this would be to login to the machine from someplace else to see whether the behavior is the same from a remote xterm/xgterm as it is on the desktop. Otherwise, I'm unable to reproduce the problem.Cheers,
-Mike

 
Profile Email
 Quote
ncaon
 04/18/2008 05:11PM  
++---
Junior

Status: offline


Registered: 10/30/2005
Posts: 29
Hi Mike,
many thanks for the very quick reply.I did what you suggested. I connected from my old windows laptop via ssh and putty to a RHEL4 machine and started Iraf: ctrl-C works OK. From there I ssh into a FC8 machine, start Iraf and ... ctrl-C kills Iraf exactly the same way I described before.The other way around is also true: if I connect first to a FC8 machine, ctrl-C kills Iraf. If then I ssh into a RHEL4 machine, ctrl-C behaves properly. Also, it does not matter whether iraf is run in a xgterm or in a konsole terminal.So the problem seems to be independent of the window manager, desktop environment, etc. One of our sysadmins checked the RedHat/Fedora bug database, but could not find anything. We'll probably file a bug report with Fedora and with IDL, let's see if we can make any progress...Cheers
Nicola

 
Profile Email
 Quote
fitz
 04/18/2008 05:11PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
Hi Nicola, One other thing is to test whether the libtermcap.so is compatible: The ecl.e binary that comes with v2.14 requires a version of this lib that isn't part of the standard FC8 release and in the past simply linking to the newer/older version worked fine. In my test, I used the old CL binary cl.e (started with "cl -old") that
doesn't have this lib dependency, as well as a statically linked ecl.e binary (from https://iraf.net/ftp/pub/fitz/ecl.e) and both worked.
If you're using an ecl.e with the libtermcap fix then we weren't testing the same thing. Not sure whether this has anything to do with the IDL problem, but it's worth testing the static ecl.e to be sure.Cheers,
-Mike

 
Profile Email
 Quote
ncaon
 04/18/2008 05:11PM  
++---
Junior

Status: offline


Registered: 10/30/2005
Posts: 29
Hi Mike,I managed to find out what is producing the problem. It does not depend on which specific cl/ecl executable is run, whether it's old or new, dynamically or statically linked. It depends on whether it's launched using or not the "exec" call. It turns out that our "ecl" command was actually a local script which, after defining all relevant variables, launches ecl.e without the exec call, while iraf's own ecl.csh script does use exec (I don't remember exactly the reasons why ecl was set up as a local script, but I think it's related to having, during some period, two versions of iraf installed at the same time).To better illustrate the point, I include here two (simplified) copies of the local ecl script.[code:1:a030062c91]#!/bin/csh -f# define iraf, IRAFARCH and arch
setenv IRAFARCH redhat
setenv arch .$IRAFARCH
setenv iraf "/iraf/iraf/"# source file irafuser.csh
source ${iraf}unix/hlib/irafuser.csh# Stacksize unlimited fix
limit stacksize unlimited# Execute ecl (using exec call)
exec ${iraf}/../irafbin/bin.redhat/ecl.e[/code:1:a030062c91][code:1:a030062c91]#!/bin/csh -f# define iraf, IRAFARCH and arch
setenv IRAFARCH redhat
setenv arch .$IRAFARCH
setenv iraf "/iraf/iraf/"# source file irafuser.csh
source ${iraf}unix/hlib/irafuser.csh# Stacksize unlimited fix
limit stacksize unlimited# Execute ecl without using exec
${iraf}/../irafbin/bin.redhat/ecl.e[/code:1:a030062c91]The first is the good (fixed) one, the second is the one we had and was giving all this trouble with ctrl-C.
Now, I do not know why the use or not of exec has suddenly become an issue with FC8 (out of curiosity I checked on my Tiger MacIntel, and ctrl-C behaves correctly independently of "exec"), and why apparently it only seems to affect ctrl-C and nothing else. Perhaps it's a new FC8 feature ...
The ctrl-C problem also showing up with IDL is basically the same: the idl command is a local script which, after checking license files and servers, expanding the IDL path to add a bunch of external libraries etc., calls the actual idl executable.The moral to the story is never mess around with iraf (or IDL) scripts...Thanks again for the quick and very helpful replies to my posts,
cheersNicola

 
Profile Email
 Quote
   
Content generated in: 0.15 seconds
New Topic Post Reply

Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Filtered HTML Allowed 
Censored Content 
dog allergies remedies cialis 20 mg chilblain remedies


Privacy Policy
Terms of Use

User Functions

Login