Bug 121976 - [PATCH] shells other than BASH cause at to not inherit environment properly
Summary: [PATCH] shells other than BASH cause at to not inherit environment properly
Keywords:
Status: CLOSED DUPLICATE of bug 112430
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: at
Version: 3.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jens Petersen
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-04-29 14:05 UTC by Neil Horman
Modified: 2007-11-30 22:07 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-02-21 19:02:51 UTC
Target Upstream Version:
Embargoed:


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

Description Neil Horman 2004-04-29 14:05:50 UTC
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 14:07:42 UTC
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 04:15:50 UTC
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 19:02:51 UTC
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.