Bug 739991
| Summary: | Unsure if bug: having exit commands in files in /etc/profile.d may be a bad idea | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | David Tonhofer <bughunt> |
| Component: | coreutils | Assignee: | Ondrej Vasik <ovasik> |
| Status: | CLOSED NOTABUG | QA Contact: | qe-baseos-daemons |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.1 | CC: | meyering, prc |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-09-21 10:08:32 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
David Tonhofer
2011-09-20 15:57:09 UTC
Worksforme without troubles... it just exits from the sourced script and continues with the next one... see the following (I added echo $i to the foreach cycle in csh.cshrc to output sourced .csh scripts): [root@dhcp-24-196 tests]# echo exit > /etc/profile.d/crashme.csh [root@dhcp-24-196 tests]# exit exit [Reset@dhcp-24-196 tests]$ tcsh /etc/profile.d/cobbler.csh /etc/profile.d/colorls.csh /etc/profile.d/crashme.csh /etc/profile.d/cvs.csh /etc/profile.d/glib2.csh /etc/profile.d/gnome-ssh-askpass.csh /etc/profile.d/kde.csh /etc/profile.d/lang.csh /etc/profile.d/less.csh /etc/profile.d/mc.csh /etc/profile.d/qt.csh /etc/profile.d/rh-env.csh /etc/profile.d/vim.csh /etc/profile.d/which2.csh So it just works just fine for me... I tried the same with ssh connection to tcsh acoount - with no issues. Closing NOTABUG, please provide more information how to reproduce the error. Hi That's pretty interesting. Retested with tcsh, and indeed - no exit. I just assumed that it would do the same as bash, but no. So tcsh has a special handling of "exit" on sourced scripts: it doesn't actually exit if exit is called via a sourced script. Or more likely, exit calls are being explicitely trapped... which does not happen with bash. Unexpected for sure. |