Bug 121976 - [PATCH] shells other than BASH cause at to not inherit environment properly
[PATCH] shells other than BASH cause at to not inherit environment properly
Status: CLOSED DUPLICATE of bug 112430
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: at (Show other bugs)
3.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jens Petersen
Mike McLean
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-04-29 10:05 EDT by Neil Horman
Modified: 2007-11-30 17:07 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-02-21 14:02:51 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
patch to correct at environment settings (949 bytes, patch)
2004-04-29 10:07 EDT, Neil Horman
no flags Details | Diff

  None (edit)
Description Neil Horman 2004-04-29 10:05:50 EDT
Description of problem:
If $SHELL is set to /bin/tcsh (or other shell that does not use sh
compatible environment settings, environment is not applied propoerly
to job (see issue tracker 37695 for more details).

Version-Release number of selected component (if applicable):


How reproducible:
always

Steps to Reproduce:
1.export SHELL=/bin/tcsh
2.create a file at_test with a shell command in it (I use echo $SHELL)
2.run at -f ./at_test now
3.check mail for results of at command execution
  
Actual results:
errors are reported in returned mail, as follows:
MANPATH=/usr/man:/usr/lang/man:/usr/local/man:/usr/local/apps/man:/usr/local/gnu/man:/usr/local/share/contrib/man:/usr/afsws/man:/usr/share/catman:/usr/share/man:/usr/catman:/pdi/man:/usr/kerberos/man:/usr/local/man:/usr/remote/man:/usr/public/man:/usr/sw/platform/lsf5.1/share/man:/usr/man:/usr/X11R6/man:/usr/share/man:/usr/remote/man/opengl:/usr/X11R6/man:
Command not found.
export: Command not found.
NNTPSERVER=news: Command not found.
export: Command not found.
SSH_AGENT_PID=30395: Command not found.
export: Command not found.
STUDIO=RWC: Command not found.
export: Command not found.
SUPPORTED=en_US:en: Command not found.
export: Command not found.
hostname=engine: Command not found.
export: Command not found.
HOSTNAME=engine: Command not found.
export: Command not found.
OS_NAME=linux: Command not found.
export: Command not found.
DW_PERCS_HOME=/home/percs: Command not found.
export: Command not found.
A_PROC_NUM=0: Command not found.
export: Command not found.
IO_LOCK_TIME=600: Command not found.
export: Command not found.
HOST=engine: Command not found.
export: Command not found.
CVSROOT=/rel/cvsroot: Command not found.
export: Command not found.
LASTMONTH=mar: Command not found.
export: Command not found.
PDI_BINARY_TYPE=l2: Command not found.
export: Command not found.


Expected results:
mail should contain only results of whatever was placed in ./at_test

Additional info:
Comment 1 Neil Horman 2004-04-29 10:07:42 EDT
Created attachment 99776 [details]
patch to correct at environment settings

This patch corrects the shell environment problem by setting the shell to
/bin/bash, exporting the inherited environment using standard shell commands,
and then running the $SHELL specified shell to interpret the submitted job.
Comment 2 Jens Petersen 2004-04-30 00:15:50 EDT
AFAIK a fixed package will appear in U2 for this issue

*** This bug has been marked as a duplicate of 112430 ***
Comment 5 Red Hat Bugzilla 2006-02-21 14:02:51 EST
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.

Note You need to log in before you can comment on or make changes to this bug.