Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 54495 - gcc-config, and all scripts, in general, should catch control-c
Summary: gcc-config, and all scripts, in general, should catch control-c
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-19 22:46 UTC by Aaron Peterson
Modified: 2004-10-25 19:30 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aaron Peterson 2004-06-19 22:46:56 UTC
it's not hard to have a shell script catch things like control-c

I pressed control-c in my
 gcc-config 2
operation...

well, it said it completed successfully, but.. yaknow, it didn't complete successfully.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Martin Schlemmer (RETIRED) gentoo-dev 2004-06-20 08:03:25 UTC
What should it do on control-c ?  It might be that the user wanted to terminate
it ... ?
Comment 2 Aaron Peterson 2004-06-20 17:52:56 UTC
not report that it switched the gcc...


>What should it do on control-c ?  It might be that the user wanted to terminate
it ... ?
>>well, it said it completed successfully, but.. yaknow, it didn't complete successfully.
Comment 3 SpanKY gentoo-dev 2004-06-23 17:37:06 UTC
i'd suggest we just do the samething as we do with /sbin/rc:
trap ":" INT QUIT TSTP

the user could possibly ctrl+c in the middle of the switch
Comment 4 Martin Schlemmer (RETIRED) gentoo-dev 2004-07-24 14:07:24 UTC
Yes, but I cannot see the use, as what takes the longest (and will 99% of the
time catch the ctrl-c) is env-update, and as that is python, or trap is
overridden ... (which means ctrl-c will anyhow abort the whole thing)
Comment 5 Aaron Peterson 2004-07-25 03:19:08 UTC
The problem was, that it said the conversion completed... and it wasn't completed.

gcc --version read the previous version, while gcc-config said it was the later version... (or.. actually they may have both said the previous version... but...  gcc-config said that it has switched me to my new choice of compiler version... and it was in error...


Catching a control-c isn't hard... in a shell script.. (well.. what I read anyway)

Maybe gcc-config needs to check the output of the program that relinks? stuff... that caught the control-c during it's 99 percent of the time...

And, 1 percent failure rate.. is pretty bad actually...

(sorta paraphrasing what my dad said... I got him to switch one of his windows NT machines to gentoo...he said: Lots of minor problems)

Catching things like control-c should be policy...   

The point is that people are going to run into these things, and not report them, they'll just reinstall their whole system again with the correct compiler, or... reinstall windowsXP!
Comment 6 SpanKY gentoo-dev 2004-10-25 19:30:30 UTC
1.3.7 does this