Avatar of Lionelh
Lionelh
Flag for United States of America asked on

Exec command doesn't work with Suse 10.1

For some reason I can't get the Exec command to work, when used it kicks you out (Logs user out). I'm using Suse 10.1... Any suggestions?
Linux OS Dev

Avatar of undefined
Last Comment
Tintin

8/22/2022 - Mon
ozo

How are you using it?
Lionelh

ASKER
The command I'm using is    exec $CMS_Exec/cms
CMS is a program I'm using...
ahoffmann

why would you use exec?
Are you aware what it does?
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
ahoffmann

> .. when used it kicks you out ..
if used in a shell, that's exactly what it is supposed to do after running your program)
ravenpl

exec anything
replaces Your shell with anything. Therefore if 'anything' finishes it's execution Your login session ends (as shell(possibly replaced by anything) spawned for this session exited). So it's normal.
avsrivastava

if you want to execute something, you don't need to type exec before that.

this is how you would usually execute things(lets say foo is the executable):
if foo lies in current directory
  ./foo
or use complete path to foo(starts with a /)
  /path/to/foo/relative/to/root/foo
or relative path(starts with a '.' (dot))
 ./path/to/foo/relative/to/current/foo

if foo lies in a directory which is in the path variable($PATH)
  foo

if you want the program to execute in background, giving you the shell back immediately
  foo &

to execute one program after another
  foo && bar
 (second is executed only if first succeeds), or
  foo ; bar
(both get executed anyways)
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Tintin

If $CMS_Exec/cms is a non-existent executable, exec will effectively kick you off as it will be trying to overlay your current process (login) with a non-existent process.

When using exec, you want to be very careful.  I'd do something like:

if [ -x $CMS_Exec/cms ]
then
    exec $CMS_Exec/cms
else
    echo "$CMS_Exec/cms is not found or not executable"
    exit 1
fi
ravenpl

> If $CMS_Exec/cms is a non-existent executable, exec will effectively kick you off as it will be trying to overlay your current process (login) with a non-existent process.
Untrue: upon failure exec() does return with error code.
try yourself after login
exec non_existent
exec true
Tintin

ravenpl.

Try doing that in your .profile :-)

Your help has saved me hundreds of hours of internet surfing.
fblack61
ahoffmann

haha, nice difference between bourne shells and (t)csh
So I guess the shell is the culprit, not  exec.
Lionelh

ASKER
Ok I wish I ad of jumped in earlier,
thats exactly what I want it to do for the users.
Run the program automatically and kick them out the shell when they log off.
But instead of doing that it kicks them out right away, as soon as they log into there session.
And if you take away the exec command from there profile and try to run CMS/exec it just kicks you out right after
you hit enter...
ahoffmann

> ..  take away the exec command from there profile and try to run CMS/exec it just kicks you out right after

could you please post the corresponding CMS/exec call and the following lines from your .profile verbatime

If just the CMS/exec is the culprit which logs you out) then a workyround may be:
  (CMS/exec )&
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Tintin

Is $CMS/cms a script or a binary?  If it's a script, can you post the contents (if it's not too big)

Are you saying that with just

$CMS/cms

in the users .profile, they go into the application and then when they exit, they need to press enter to logout or are you saying they simply get to press enter and then get logged out straight away without the cms application starting?

If the later, it sounds very much like $CMS/cms is failing somewhere and simply exiting/terminating.  

Can you run $CMS/cms successfully from the command line?
Lionelh

ASKER
# important for language settings, see below.

test -z "$PROFILEREAD" && . /etc/profile

# Most applications support several languages for their output.
# To make use of this feature, simply uncomment one of the lines below or
# add your own one (see /usr/share/locale/locale.alias for more codes)
#
#export LANG=de_DE.UTF-8        # uncomment this line for German output
#export LANG=fr_FR.UTF-8        # uncomment this line for French output
#export LANG=es_ES.UTF-8        # uncomment this line for Spanish output

export LANG=en_US
# Some people don't like fortune. If you uncomment the following lines,
# you will have a fortune each time you log in ;-)

#if [ -x /usr/bin/fortune ] ; then
#    echo
#    /usr/bin/fortune
#    echo
#fi
. $CMS_EXEC/cmMS_EXEC/cms

"This last line is what runs in the .profile

Verbatim thats all I got in the profile to execute this programand from the command line it doesn't work either I can type in   exec $CMS_EXEC/cms    and it just take me straight to the login screen or if in a shell closes it. By the way this only happens with one specififc profile. Just so you know the application works fine. I can run ./cms as a script and it opens fine. But due to the fact we has some not so smart users we need it to only open that program and when they hit exit it closes the shell...
Lionelh

ASKER
Wait a Minute Guys I made one new discovery
I ran the command  $CMS_EXEC/cms
from the command line alone instaed of loging in through the profile and I got to see the error message but I don't really understand it,

/u/pow/cms_exec/cms: line 16: /usr/cognos/ph733c6/bin/quick: Operation not permitted

It might just be confusing the  situation but what do you guys think?
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
Tintin

That's exactly what the problem is.  When you do an exec from the .profile of a command, it isn't getting to the point of successfully starting, hence the reason it exits and the user is instantly logged off.

Was it ever working correctly?

What does

file /u/pow/cms_exec/cms

give you.  If it is a non binary file, do

sed -n 16p /u/pow/cms_exec/cms

Also do

ls -l /usr/cognos/ph733c6/bin/quick
Lionelh

ASKER
Nope never worked correctly...
and that path is where the program is located,
so it looks like I didn't set it up but thats where you  can run it.

When I ran the command you gave above it returned

then quick auto=$CMS_EXEC/centqkgo

What does that mean?
And the second command returned

-rwxrwxrwx 1 root root 2528380 Sep 11 08:28 /usr/cognos/ph733c6/bin/quick

Tintin

Are you absolutely sure that's what line 16 says?  Did you miss a semi-colon.

Perhaps you could post the first 20 lines or so of it.

Try doing

/usr/cognos/ph733c6/bin/quick auto=$CMS_EXEC/centqkgo

from the command line.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
ahoffmann

in your posted script we see that
  . $CMS_EXEC/cmMS_EXEC/cms
is a shell script, 'cause it is sourced
Keep in mind that it relies on all your aother shell settings when run.

Please post the content of
   $CMS_EXEC
Lionelh

ASKER
OK when I type in that line you mentioned Tintin it takes me to a black screen, could it be the path?

and the other lines of the .profile script is above

also when you say Please post the content of
   $CMS_EXEC

does it matter in what line that shows up in on the script?
Lionelh

ASKER
$CMS_EXEC is a folder that holds the content of that program
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
Lionelh

ASKER
The contents of that folder is...

CENT131D.qkc  CENT4000.qkc  CENT6030.qkc      cent1521.qzs          cent4127.qts      cent9103.qks
CENT1321.qzc  CENT4010.qkc  CENT6031.qtc      cent152d.qks          cent4127.qzs      cent9104.qks
CENT1322.qzc  CENT4011.qkc  CENT6040.qkc      cent1531.qzs          cent4128.qts      cent9105.qks
CENT1323.qzc  CENT4012.qkc  CENT6041.qtc      cent153d.qks          cent4128.qzs      cent9106.qks
CENT132D.qkc  CENT4013.qkc  CENT6050.qkc      cent1541.qzs          cent4129.qts      cent9107.qks
CENT1331.qzc  CENT4014.qkc  CENT6051.qtc      cent154d.qks          cent4129.qzs      cent9108.qks
CENT133D.qkc  CENT4015.qkc  CENT6060.qkc      cent1551.qzs          cent412a.qts      cent9109.qks
CENT1341.qzc  CENT4016.qkc  CENT6061.qtc      cent155d.qks          cent412a.qzs      cent9110.qks
CENT134D.qkc  CENT4017.qkc  CENT6070.qkc      cent1561.qzs          cent412d.qks      cent9111.qks
CENT1351.qzc  CENT4018.qkc  CENT6071.qtc      cent156d.qks          cent4131.qts      cent9112.qks
CENT135D.qkc  CENT401S.qkc  CENT6080.qkc      cent1571.qzs          cent4131.qzs      cent9113.qks
CENT1361.qzc  CENT4020.qtc  CENT6081.qtc      cent1572.qzs          cent4131.unx      cent9114.qks
CENT136D.qkc  CENT4021.qzc  CENT6090.qkc      cent157d.qks          cent4132.qts      cent9115.qks
CENT1371.qzc  CENT4022.qzc  CENT6091.qtc      cent1581.qzs          cent4132.qzs      cent9116.qks
CENT137D.qkc  CENT4023.qzc  CENT6100.qkc      cent158d.qks          cent4133.qts      cent9117.qks
CENT1381.qzc  CENT4024.qzc  CENT6101.qtc      cent2000.qks          cent4133.qzs      cent9118.qks
CENT138D.qkc  CENT4025.qzc  CENT6110.qkc      cent2010.qks          cent4134.qts      cent9119.qks
CENT1391.qzc  CENT4026.qzc  CENT6111.qtc      cent2011.qks          cent4134.qzs      cent911a.qks
CENT139D.qkc  CENT4027.qzc  CENT6120.qkc      cent2012.qks          cent4136.qzs      cent9120.qks
CENT1401.qzc  CENT4028.qzc  CENT6121.qtc      cent2013.qks          cent413d.qks      cent9121.qks
CENT140D.qkc  CENT4029.qzc  CENT6130.qkc      cent2014.qks          cent4141.qts      cent9122.qks
CENT1411.qzc  CENT402D.qkc  CENT6131.qtc      cent2015.qks          cent4141.qzs      cent9123.qks
CENT1412.qzc  CENT4030.qtc  CENT6140.qkc      cent2016.qks          cent414d.qks      cent9124.qks
CENT141D.qkc  CENT4031.qzc  CENT6141.qtc      cent2017.qks          cent4150.qzs      cent9125.qks
CENT1421.qzc  CENT4032.qzc  CENT6150.qkc      cent2018.qks          cent4151.qzs      cent9127.qks
CENT1422.qzc  CENT4033.qzc  CENT6151.qtc      cent2019.qks          cent4152.qzs      cent9128.qks
CENT142D.qkc  CENT4034.qzc  CENT6160.qkc      cent201a.qks          cent415d.qks      cent9128.qks.bak
CENT1431.qzc  CENT4035.qzc  CENT6161.qtc      cent201b.qks          cent4210.qks      cent9201.qks
CENT143D.qkc  CENT403D.qkc  CENT6170.qkc      cent201c.qks          cent4211.qks      cent9211.qks
CENT1441.qzc  CENT4040.qkc  CENT6171.qtc      cent201d.qks          cent4212.qks      cent9412.qks
CENT1442.qzc  CENT4050.qtc  CENT6180.qkc      cent201e.qks          cent4213.qks      cent9500.qzs
CENT144D.qkc  CENT4051.qzc  CENT6181.qtc      cent201f.qks          cent4214.qks      centNEEd.qks
CENT1451.qzc  CENT4052.qzc  CENT6190.qkc      cent201g.qks          cent4215.qks      centacct.qks
CENT1452.qzc  CENT4053.qzc  CENT6191.qtc      cent201h.qks          cent4216.qks      centagen.qks
CENT1453.qzc  CENT405D.qkc  CENT6200.qkc      cent201i.qks          cent4221.qzs      centaid.qks
CENT145D.qkc  CENT4060.LOG  CENT6201.qtc      cent201j.qks          cent4222.qzs      centallo.qks
CENT1461.qzc  CENT4061.qzc  CENT6210.qkc      cent201k.qks          cent4223.qzs      centback.qks
CENT146D.qkc  CENT4062.qzc  CENT6211.qtc      cent201l.qks          cent4224.qzs      centbad.qks
CENT1471.qzc  CENT4063.qzc  CENT6220.qkc      cent2021.qzs          cent422d.qks      centbase.qks
CENT147D.qkc  CENT4064.qzc  CENT6221.qtc      cent2022.qzs          cent4231.qts      centcare.qks
CENT1481.qzc  CENT4065.qzc  CENT6230.qkc      cent2023.qzs          cent4231.qzs      centcate.qks
CENT1482.qzc  CENT406D.qkc  CENT6231.qtc      cent2024.qzs          cent423d.qks      centcent.qks
CENT148D.qkc  CENT406S.qkc  CENT6240.qkc      cent2025.qzs          cent4290.qks      centchng.qks
CENT1491.qzc  CENT4071.qzc  CENT6241.qtc      cent2026.qzs          cent429s.qks      centclas.qks
CENT149D.qkc  CENT4072.qzc  CENT6310.qkc      cent2027.qzs          cent4300.qzs      centctrl.qks
CENT1501.qzc  CENT4110.qkc  CENT6315.qkc      cent2028.qzs          cent4301.qzs      centelig.qks
CENT150D.qkc  CENT4111.qkc  CENT6315.qtc      cent2029.qzs          cent4302.qzs      centethn.qks
CENT1511.qzc  CENT4111.qtc  CENT6317.qkc      cent202a.qzs          cent4303.qzs      centfee.qks
CENT151D.qkc  CENT4112.qkc  CENT6320.qkc      cent202b.qzs          cent430a.qzs      centgmg2.qks
CENT1521.qzc  CENT4112.qtc  CENT6325.qkc      cent202c.qzs          cent430d.qks      centgmrg.qks
CENT152D.qkc  CENT4113.qkc  CENT6325.qtc      cent202d.qks          cent4310.qks      centgrou.qks
CENT1531.qzc  CENT4113.qtc  CENT6327.qkc      cent202d.qzs          cent4320.qts      centincm.qks
CENT153D.qkc  CENT4114.qkc  CENT6330.qkc      cent2030.qzs          cent4320.qzs      centinco.qks
CENT1541.qzc  CENT4114.qtc  CENT6331.qkc      cent2031.qzs          cent4321.qzs      centlang.qks
CENT154D.qkc  CENT4115.qkc  CENT6331.qtc      cent2032.qzs          cent4322.qzs      centlev.qks
CENT1551.qzc  CENT4115.qtc  CENT6332.LOG      cent2033.qzs          cent4323.qzs      centmenu.qks
CENT155D.qkc  CENT4116.qkc  CENT6332.qkc      cent2034.qzs          cent4324.qzs      centmerg-CLIENT.qzs
CENT156D.qkc  CENT4116.qtc  CENT6332.qtc      cent2035.qzs          cent4325.qzs      centmile.qks
CENT1571.qzc  CENT4117.qkc  CENT6333.qkc      cent203d.qks          cent4326.qzs      centmrgd-CENTER.qzs
CENT1572.qzc  CENT4117.qtc  CENT6333.qtc      cent2041.qts          cent432a.qzs      centmrgd-CLIENT.qzs
CENT157D.qkc  CENT4118.qkc  CENT6334.qkc      cent2041.qzs          cent432d.qks      centmrgd-CLIENT_CONTRACT.qzs
CENT1581.qzc  CENT4118.qtc  CENT6334.qtc      cent2042.qts          cent4340.qks      centmrgh-CENTER.qzs
CENT158D.qkc  CENT4119.qkc  CENT6335.LOG      cent2042.qzs          cent4350.qzs      centmrgh-CLIENT.qzs
CENT2000.qkc  CENT4119.qtc  CENT6335.qkc      cent2043.qts          cent4351.qzs      centmrgh-CLIENT_CONTRACT.qzs
CENT2010.qkc  CENT411A.qkc  CENT6335.qtc      cent2043.qzs          cent4352.qzs      centmrgi.qzs
CENT2011.qkc  CENT411A.qtc  CENT6336.LOG      cent2044.qts          cent4353.qzs      centmrgr-CLIENT.qzs
CENT2012.qkc  CENT4121.qtc  CENT6336.qkc      cent2044.qzs          cent4354.qzs      centmrgr-CLIENT_CONTRACT.qzs
CENT2013.qkc  CENT4121.qzc  CENT6336.qtc      cent2045.qts          cent435a.qzs      centmrgs.qzs
CENT2014.qkc  CENT4122.qtc  CENT6337.qkc      cent2045.qzs          cent435d.qks      centpool.qks
CENT2015.qkc  CENT4122.qzc  CENT6337.qtc      cent2046.qts          cent5000.qks      centprio.qks
CENT2016.qkc  CENT4123.qtc  CENT6338.qkc      cent2046.qzs          cent5010.qks      centproj.qks
CENT2017.qkc  CENT4123.qzc  CENT6338.qtc      cent2047.qts          cent5011.qts      centqdes.qks
CENT2018.qkc  CENT4124.qtc  CENT6339.qkc      cent2047.qzs          cent5012.qts      centqkgo.qkg
CENT2019.qkc  CENT4124.qzc  CENT6339.qtc      cent2048.qks          cent5013.qks      centqkgob.dat
CENT201A.qkc  CENT4125.qtc  CENT633A.qkc      cent2048.qts          cent5013.qts      centqkgob.idx
CENT201B.qkc  CENT4125.qzc  CENT633B.qkc      cent2048.qzs          cent5014.qts      centqkgok.dat
CENT201C.qkc  CENT4126.qtc  CENT6340.qkc      cent2049.qts          cent5020.qks      centqkgok.idx
CENT201D.qkc  CENT4126.qzc  CENT6341.qkc      cent2049.qzs          cent5021.qks      centqkgot.dat
CENT201E.qkc  CENT4127.qtc  CENT6341.qtc      cent204a.qts          cent5022.qks      centqkgot.idx
CENT201F.qkc  CENT4127.qzc  CENT6341.sh       cent204a.qzs          cent5023.qks      centqtp.qts
CENT201G.qkc  CENT4128.qtc  CENT6342.qkc      cent204d.qks          cent5024.qks      centquiz.qts
CENT201H.qkc  CENT4128.qzc  CENT6342.qtc      cent204s.qks          cent5027.qzs      centquiz.sh
CENT201I.qkc  CENT4129.qtc  CENT6343.qkc      cent2050.qzs          cent5030.qkc      centrea.qks
CENT201J.qkc  CENT4129.qzc  CENT6343.qtc      cent2051.qzs          cent5030.qks      centsave.qks
CENT201K.qkc  CENT412A.qtc  CENT6410.qkc      cent2052.qzs          cent5030.qks.bak  centscho.qks
CENT201L.qkc  CENT412A.qzc  CENT6420.qkc      cent2053.qzs          cent5031.qks      centserv.qks
CENT2021.qzc  CENT412D.qkc  CENT6430.qkc      cent2054.qzs          cent5031.qzs      centslct.qks
CENT2022.qzc  CENT4130.sf   CENT6431.qkc      cent2055.qzs          cent5032.qks      centstat.qks
CENT2023.qzc  CENT4130.sfd  CENT6431.qzc      cent2056.qzs          cent5040.qts      centstrt.qks
CENT2024.qzc  CENT4131.MAC  CENT6432.qkc      cent2057.qzs          cent5041.qzs      centtype.qks
CENT2025.qzc  CENT4131.qtc  CENT643D.qkc      cent2058.qzs          cent5042.qzs      check.qks
CENT2026.qzc  CENT4131.qzc  CENT9101.qkc      cent2059.qzs          cent5043.qzs      clear.qts
CENT2027.qzc  CENT4131.sf   CENT9102.qkc      cent205a.qzs          cent5044.qzs      closetime.qts
CENT2028.PRN  CENT4131.sfd  CENT9103.qkc      cent205b.qzs          cent5045.qzs      cms
CENT2028.prn  CENT4132.MAC  CENT9104.qkc      cent205c.qzs          cent5048.qzs      cms.pdf
CENT2028.qzc  CENT4132.qtc  CENT9105.qkc      cent205d.qks          cent504d.qks      convert.qts
CENT2029.qzc  CENT4132.qzc  CENT9106.qkc      cent205d.qzs          cent5050.qts      core
CENT202A.qzc  CENT4133.MAC  CENT9107.qkc      cent205e.qzs          cent5051.qzs      custom
CENT202B.qzc  CENT4133.qtc  CENT9108.qkc      cent205f.qzs          cent5052.qzs      dos2unix
CENT202C.qzc  CENT4133.qzc  CENT9109.qkc      cent2061-footing.qzs  cent5053.qzs      download
CENT202D.qkc  CENT4134.MAC  CENT9110.qkc      cent2061-merge.qts    cent505d.qks      edit.qks
CENT202D.qzc  CENT4134.qtc  CENT9111.qkc      cent2061-merge.qzs    cent5060.qts      error.log
CENT2030.qzc  CENT4134.qzc  CENT9112.qkc      cent2061.qts          cent5061.qzs      export.txt
CENT2031.qzc  CENT4134.sf   CENT9113.qkc      cent2061.qzs          cent5062.qzs      fixclass.qts
CENT2032.qzc  CENT4134.sfd  CENT9114.qkc      cent2062-merge.qzs    cent5063.qzs      fixserv.qks
CENT2033.qzc  CENT413D.qkc  CENT9115.qkc      cent2062.qzs          cent5064.qzs      form.pcl
CENT2034.qzc  CENT4141.qtc  CENT9116.qkc      cent2063-merge.qzs    cent5065.qzs      help.qks
CENT2035.qzc  CENT4141.qzc  CENT9117.qkc      cent2063.qzs          cent5066.qzs      hilite.qks
CENT203D.qkc  CENT414D.qkc  CENT9118.qkc      cent2064-merge.qzs    cent5067.qzs      hold.qks
CENT2040.LOG  CENT4150.qzc  CENT9119.qkc      cent2064.qzs          cent5068.qzs      initial.qks
CENT2041.MAC  CENT4151.qzc  CENT911A.qkc      cent2065-merge.qzs    cent506d.qks      lang
CENT2041.qtc  CENT415D.qkc  CENT9120.qkc      cent2065.qzs          cent5070.qts      license.qks
CENT2041.qzc  CENT4210.qkc  CENT9121.qkc      cent2066-merge.qzs    cent5071.qzs      listtext.qzs
CENT2042.MAC  CENT4211.qkc  CENT9122.qkc      cent2066.qzs          cent5072.qzs      load180.qts
CENT2042.qtc  CENT4212.qkc  CENT9123.qkc      cent2067.qzs          cent5073.qzs      loadmerge.qks
CENT2042.qzc  CENT4213.qkc  CENT9124.qkc      cent2068.qzs          cent5074.qzs      loadtext.qkc
CENT2043.qtc  CENT4214.qkc  CENT9125.qkc      cent206d.qks          cent5075.qzs      loadtext.qks
CENT2043.qzc  CENT4215.qkc  CENT9127.qkc      cent206f.qks          cent5076.qzs      logo.qks
CENT2044.qtc  CENT4216.qkc  CENT9128.qkc      cent206l.qks          cent507d.qks      makedisk
CENT2044.qzc  CENT4221.qzc  CENT9201.qkc      cent206s.qks          cent5080.qks      makeelig.qks
CENT2045.qtc  CENT4222.qzc  CENT9211.qkc      cent2110.qks          cent5081.qks      makerepo.sh
CENT2045.qzc  CENT4223.qzc  CENT9412.qkc      cent2115.qks          cent5110.qks      merge.csv
CENT2046.qtc  CENT4224.qzc  CENTACCT.qks      cent2116.qks          cent5111.qks      merge.out
CENT2046.qzc  CENT422D.qkc  CENTAGEN.qks      cent2117.qks          cent5111.qts      mile.mac
CENT2047.qtc  CENT4230.qtc  CENTAID.qks       cent2118.qks          cent5112.qts      mktab
CENT2047.qzc  CENT4231.qtc  CENTALLO.qks      cent2122.qzs          cent5120.qks      newclient.qus
CENT2048.MAC  CENT4231.qzc  CENTBAD.qkc       cent2123.qzs          cent5121.qks      newfees.tar
CENT2048.qtc  CENT423D.qkc  CENTBASE.qks      cent2124.qzs          cent5130.qks      newfile
CENT2048.qzc  CENT4290.qkc  CENTCARE.qks      cent2125.qzs          cent5131.qks      newrank.qts
CENT2049.qtc  CENT429S.qkc  CENTCATE.qks      cent212d.qks          cent5140.qts      nofa-2.mac
CENT2049.qzc  CENT4300.qzc  CENTCENT.qks      cent2130.qzs          cent5141.qzs      nul
CENT204A.qtc  CENT4301.qzc  CENTCHNG.qkc      cent2131.qzs          cent5142.qzs      oagency.sf
CENT204A.qzc  CENT4302.qzc  CENTCLAS.qks      cent2132.qzs          cent514d.qks      oagency.sfd
CENT204D.qkc  CENT4303.qzc  CENTCTRL.qkc      cent2133.qzs          cent5151.qzs      obase.sf
CENT204S.qkc  CENT430A.qzc  CENTELIG.qks      cent2134.qzs          cent5152.qzs      obase.sfd
CENT2050.qzc  CENT430D.qkc  CENTETHN.qks      cent213d.qks          cent515d.qks      obill.sf
CENT2051.qzc  CENT4310.qkc  CENTFEE.qks       cent2141.qzs          cent5160.qks      obill.sfd
CENT2052.qzc  CENT4320.qtc  CENTGROU.qks      cent2142.qzs          cent5161.qks      ocalendar.sf
CENT2053.qzc  CENT4320.qzc  CENTINCM.qks      cent2143.qzs          cent516d.qks      ocalendar.sfd
CENT2054.qzc  CENT4321.qzc  CENTINCO.qks      cent214d.qks          cent5170.qts      ocenter.sf
CENT2055.qzc  CENT4322.qzc  CENTLANG.qks      cent2150.qzs          cent5171.qzs      ocenter.sfd
CENT2056.qzc  CENT4323.qzc  CENTLEV.qks       cent2151.qzs          cent517d.qks      oclntcont.sf
CENT2057.qzc  CENT4324.MAC  CENTMENU.qkc      cent2152.qzs          cent5180.qts      oclntcont.sfd
CENT2058.qzc  CENT4324.qzc  CENTMILE.qks      cent215d.qks          cent5181.qzs      ocontract.sf
CENT2059.qzc  CENT4325.MAC  CENTNEED.qks      cent2161.qzs          cent5182.qzs      ocontract.sfd
CENT205A.qzc  CENT4325.qzc  CENTPOOL.qks      cent2162.qzs          cent5183.qzs      ocourse.sf
CENT205B.qzc  CENT4326.MAC  CENTPRIO.qks      cent2163.qzs          cent5184.qzs      ocourse.sfd
CENT205C.qzc  CENT4326.qzc  CENTPROJ.qks      cent2164.qzs          cent518d.qks      ofam.dat
CENT205D.qkc  CENT432A.qzc  CENTREA.qks       cent2167.qzs          cent5190.qks      ofee.ps
CENT205E.qzc  CENT432D.qkc  CENTSAVE.qkc      cent216d.qks          cent5191.qks      ofee.psd
CENT205F.qzc  CENT4340.qkc  CENTSCHO.qks      cent2310.qks          cent5191.qzs      ofee.sf
CENT205d.qzc  CENT4350.qzc  CENTSERV.qks      cent2311.qks          cent5192.qzs      ofee.sfd
CENT2061.prn  CENT4351.qzc  CENTSLCT.qkc      cent2312.qks          cent519d.qks      ofeedet.sf
CENT2061.qtc  CENT4352.qzc  CENTSTAT.qks      cent2313.qks          cent5200.qks      ofeedet.sfd
CENT2061.qzc  CENT4353.qzc  CENTSTRT.qkc      cent2314.qks          cent5201.qks      ofeedetl.ps
CENT2061.txt  CENT4354.qzc  CENTTYPE.qks      cent2315.qks          cent5201.qzs      ofeedetl.psd
CENT2062.qzc  CENT435A.qzc  CHECK.qks         cent2316.qks          cent5202.qzs      ofeedetl.sf
CENT2063.prn  CENT435D.qkc  CLOSETIME.qtc     cent2317.qks          cent520d.qks      ofeedetl.sfd
CENT2063.qzc  CENT4370.qzc  EXECUTE           cent2318.qks          cent5210.qks      omerge.sf
CENT2063.txt  CENT4371.qzc  EXECUTE.LOG       cent231a.qks          cent5211.qts      omerge.sfd
CENT2064.qzc  CENT4372.qzc  HELP.qks          cent231b.qks          cent5212.qts      oprovdet.sf
CENT2064.txt  CENT4373.qzc  HOLD.MAC          cent231c.qks          cent5213.qts      oprovdet.sfd
CENT2065.qzc  CENT4374.qzc  INITIAL.qks       cent231e.qks          cent5214.qts      orank.sf
CENT2066.qzc  CENT437A.qzc  LICENSE.qkc       cent231f.qks          cent5220.qks      orank.sfd
CENT2066.txt  CENT5000.qkc  LINEFEED          cent231g.qks          cent5221.qks      oschool.sf
CENT2067.qzc  CENT5010.LOG  LOGO.qks          cent231h.qks          cent5222.qks      oschool.sfd
CENT2068.qzc  CENT5010.qkc  MAKEMERGE         cent2320.qks          cent5223.qks      ostime.sf
CENT206D.qkc  CENT5011.qtc  NEWRANK.qtc       cent2321.qks          cent5230.qks      ostime.sfd
CENT206F.qkc  CENT5012.qtc  P.qks             cent2322.qks          cent5231.qzs      otime.sf
CENT206L.qkc  CENT5013.qkc  PHD.pdc           cent2331.qzs          cent5232.qzs      otime.sfd
CENT206S.qkc  CENT5013.qtc  PRESSP.qks        cent2332.qzs          cent5233.qzs      otrack.sf
CENT2110.qkc  CENT5014.qtc  PRINT.qzs         cent2333.qzs          cent5234.qzs      otrack.sfd
CENT2115.qkc  CENT5020.qkc  PRINTPRN          cent2334.qzs          cent5235.qzs      p.qks
CENT2116.qkc  CENT5021.qkc  PRNTEN.prn        cent2335.qzs          cent5241.qzs      pcl2pdf
CENT2117.qkc  CENT5022.qkc  PRNTHP.prn        cent233d.qks          cent5242.qzs      ph14060.tmp
CENT2118.qkc  CENT5023.qkc  PRNTHP.txt        cent2340.qzs          cent5243.qzs      phd.old
CENT2122.qzc  CENT5024.qkc  PRNTINCM.qkc      cent2341.qzs          cent5261.qzs      phd.pdc
CENT2123.qzc  CENT5030.qkc  PRNTPDF.tmp       cent2342.qzs          cent5262.qzs      phd.pdl
CENT2124.qzc  CENT5031.qkc  PRNTSCRN.txt      cent234d.qks          cent526d.qks      phd175.pdc
CENT2125.qzc  CENT5031.qzc  PROJECT.qkc       cent2350.qzs          cent5270.qks      phd176.pdc
CENT212D.qkc  CENT5032.qkc  PULLDRIV.qks      cent2351.qzs          cent5271.qks      phd176.pdl
CENT2130.qzc  CENT5040.qtc  PULLFINI.qks      cent2352.qzs          cent5310.qks      phd177.pdc
CENT2131.qzc  CENT5041.qzc  PULLMULT.qks      cent2353.qzs          cent5311.qts      phd177.pdl
CENT2132.qzc  CENT5042.qzc  PULLSING.qks      cent2354.qzs          cent5321.qzs      pressp.qks
CENT2133.qzc  CENT5043.qzc  SCREEN.qks        cent2355.qzs          cent5322.qzs      print.qzs
CENT2134.qzc  CENT5044.qzc  SCREENDA.qks      cent2356.qzs          cent5331.qzs      program.dat
CENT213D.qkc  CENT5045.qzc  SCREENDT.qks      cent235d.qks          cent5332.qzs      program.idx
CENT2141.qzc  CENT5048.qzc  SCREENND.qks      cent2361.qzs          cent5340.qks      program.qzs
CENT2142.qzc  CENT504D.qkc  TABSET.qzs        cent2362.qzs          cent5341.qks      project.qks
CENT2143.qzc  CENT5050.LOG  TEMP.qts          cent2363.qzs          cent5351.qzs      provcal.dat
CENT214D.qkc  CENT5050.qtc  USERCLR.qtc       cent2364.qzs          cent5352.qzs      provcal.idx
CENT2150.qzc  CENT5050.sf   apinv.mac         cent2365.qzs          cent535d.qks      pulldriv.qks
CENT2151.qzc  CENT5050.sfd  backup.qzs        cent2367.qzs          cent5361.qts      pullfini.qks
CENT2152.qzc  CENT5051.LOG  bscreen.qks       cent236d.qks          cent5361.qzs      pullmult.qks
CENT215D.qkc  CENT5051.qzc  cd9500.mac        cent3000.qks          cent5362.qts      pullscrn.qks
CENT2161.qzc  CENT5052.qzc  cen1290.qks       cent3010.qks          cent5362.qzs      pullsing.qks
CENT2162.qzc  CENT5053.qzc  cen9127a.qks      cent3011.qks          cent536d.qks      qdesign.err
CENT2163.qzc  CENT505D.qkc  cen9127b.qks      cent3012.qks          cent6000.qks      qpull
CENT2164.qzc  CENT5060.qtc  cent0000.qks      cent3020.qks          cent6010.qks      qshogen.pdl
CENT2167.qzc  CENT5060.sh   cent0000.qks.bak  cent3021.qts          cent6011.qts      qshogen.sql
CENT216D.qkc  CENT5061.qzc  cent1000.qks      cent3022.qts          cent6020.qks      qtp.err
CENT2221.qzc  CENT5062.qzc  cent1010.qks      cent3030.qks          cent6021.qts      quizlist.txt
CENT2222.qzc  CENT5063.qzc  cent1011.qks      cent3031.qts          cent6030.qks      qwin
CENT2223.qzc  CENT5064.qzc  cent1012.qks      cent3040.qks          cent6031.qts      recv-pc
CENT2224.qzc  CENT5065.qzc  cent1013.qks      cent3041.qks          cent6040.qks      recv-pc.c
CENT2225.qzc  CENT5066.qzc  cent1014.qks      cent3042.qks          cent6041.qts      repo
CENT2231.qzc  CENT5067.qzc  cent1020.qks      cent3050.qks          cent6050.qks      response.qzs
CENT2232.qzc  CENT5068.qzc  cent1021.qks      cent3051.qts          cent6051.qts      runlast
CENT2233.qzc  CENT506D.qkc  cent1022.qks      cent3060.qks          cent6060.qks      scho2dis.qts
CENT2234.qzc  CENT5070.LOG  cent1030.qks      cent3090.qks          cent6061.qts      sco_locales.tar
CENT2241.qzc  CENT5070.qtc  cent1040.qks      cent3091.qzs          cent6070.qks      screen.qks
CENT2242.qzc  CENT5071.LOG  cent1050.qks      cent3092.qzs          cent6071.qts      screenda.qks
CENT2243.qzc  CENT5071.qzc  cent1060.qks      cent3093.qzs          cent6080.qks      screendt.qks
CENT2250.qzc  CENT5072.qzc  cent1070.qks      cent3100.qks          cent6081.qts      screennd.qks
CENT2251.qzc  CENT5073.qzc  cent1080.qks      cent3101.qzs          cent6090.qks      send-pc
CENT2252.qzc  CENT5074.qzc  cent1090.qks      cent3102.qzs          cent6091.qts      send-pc.c
CENT2253.qzc  CENT5075.qzc  cent1100.qks      cent3103.qzs          cent6100.qks      setcal.qts
CENT2254.qzc  CENT5076.qzc  cent1110.qks      cent3210.qks          cent6101.qts      setup.doc
CENT2255.qzc  CENT507A.sf   cent1111.qks      cent3211.qks          cent6110.qks      stage.mac
CENT2256.qzc  CENT507A.sfd  cent1112.qks      cent3220.qks          cent6111.qts      tabset.qzs
CENT2261.qzc  CENT507D.qkc  cent1113.qks      cent3221.qts          cent6120.qks      temp.qks
CENT2262.qzc  CENT5080.qkc  cent1114.qks      cent3222.qts          cent6121.qts      temp.qts
CENT2263.qzc  CENT5081.qkc  cent1120.qks      cent3230.qks          cent6130.qks      temp.qzs
CENT2264.qzc  CENT5110.qkc  cent1121.qks      cent4000.qks          cent6131.qts      temp2.qks
CENT2267.qzc  CENT5111.qkc  cent1130.qks      cent4010.qks          cent6140.qks      temp2.qts
CENT2310.qkc  CENT5111.qtc  cent1140.qks      cent4011.qks          cent6141.qts      termcap
CENT2311.qkc  CENT5112.qtc  cent1150.qks      cent4012.qks          cent6150.qks      text.dat
CENT2312.qkc  CENT5120.qkc  cent1160.qks      cent4013.qks          cent6151.qts      text.out
CENT2313.qkc  CENT5121.qkc  cent1170.qks      cent4014.qks          cent6160.qks      text.qkc
CENT2314.qkc  CENT5130.qkc  cent1180.qks      cent4015.qks          cent6161.qts      text.qks
CENT2315.qkc  CENT5131.qkc  cent1181.qks      cent4016.qks          cent6170.qks      text1.dat
CENT2316.qkc  CENT5140.qtc  cent1190.qks      cent4017.qks          cent6171.qts      textblnk.dat
CENT2317.qkc  CENT5141.qzc  cent1200.qks      cent4018.qks          cent6180.qks      tmep.qts
CENT2318.qkc  CENT5142.qzc  cent1210.qks      cent401s.qks          cent6181.qts      unix2dos
CENT231A.qkc  CENT514D.qkc  cent1220.qks      cent4020.qts          cent6190.qks      unload177.qts
CENT231B.qkc  CENT5151.qzc  cent1230.qks      cent4021.qzs          cent6191.qts      userclr.qts
ahoffmann

oops, I meant to post the value of the variable

  echo $CMS_EXEC

anyway, as you posted the content of the directory, we can see that it does not
contain another directory  cmMS_EXEC  as used in
  $CMS_EXEC/cmMS_EXEC/cms

That seems to be your problem.
Lionelh

ASKER
ok but there are other users that are ientical that work fine... strange
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
ahoffmann

>.. but there are other users that are ientical that work fine
and what do they call?

please post the result of:

  echo ">$CMS_EXEC/cmMS_EXEC/cms<"

for both, a working and a non working user
Lionelh

ASKER
Do you want to see there .profile script

Sorry I'm a bit of a novice
ahoffmann

> Do you want to see there .profile script
no, not yet

please do following in a shell when logged in as a user where it works and as a user where it does not work:

  echo `grep CMS_EXEC ~/.profile`; eval echo `grep CMS_EXEC ~/.profile`

please copy&paste the above line, then post results
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
Lionelh

ASKER
OK where it doesn't work it shows

 ~/.profile`
. $CMS_EXEC/cms
. /u/pow/cms_exec/cms

And where is works

  ~/.profile`
exec $CMS_EXEC/cms
exec /u/pow/cms_exec/cms

but I think that was changed so that is automatically starts this program but what we need is when thay exit the program for it close the the shell...
Where it doesn't close the shell when they exit the program is the top three line and the bottom is where it exits
Both where the user login starts the program correctly...
Lionelh

ASKER
If this is getting confusing let me know
ahoffmann

and why did you replace the exec by . when exec worked?
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Lionelh

ASKER
no exec on that profile didn't workfor some reason
ahoffmann

> And where is works
in your previous comment, and now:
>  no exec on that profile didn't workfor some reason

which one is the truth now?
Tintin

OK, let's try another approach.

Pick one user, where the cms app starts up correct and one where it doesn't.

Change their .profiles to read

sh -x $CMS_EXEC/cms

and compare the output of the one that works and the one that doesn't work.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
Lionelh

ASKER
OK to answer ahoffman's question on the above the first one did not work with exec so I used .
the second one always worked as it was supposed to.

With the first one using exec would just cause you to get kicked out of the shell when you first would login...


Tintin I'm trying your solution right now...
Lionelh

ASKER
ok Tintin well that worked when the user logs in just the sam but when the user exit the progam it still takes you back to the prompt instead of closing the shell.
Tintin

lionelh, the whole point was to compare the debug output of the two sessions to see what the difference is.

I'm still confused as to which one snippet you are referring to as the "first one" and the "second one".

Please post both to ensure we can be abolutely sure as to which one works and which one doesn't.

From my understanding, you say the following works:

. $CMS_EXEC/cms
. /u/pow/cms_exec/cms

whereas, the following *doesn't* work

exec $CMS_EXEC/cms
exec /u/pow/cms_exec/cms

However, originally you said you had the following in the .profile

. $CMS_EXEC/cmMS_EXEC/cms

Which is correct.  It's very hard to diagnose a problem where the information varies.

what is $CMS_EXEC set to?  Note that once you use exec, no other lines in your script will be processed, so 'exec /u/pow/cms_exec/cms' will never be executed.  However, I suspect the value of $CMS_EXEC is /u/pow/cms_exe, so I'm not sure why you are specifying it twice.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
ahoffmann

so your goal is that the user is logged out after exiting th eprogram?

Then you either have to uses exec (as you tried) *and* ensure that the exec'd program returns status 0,
or you have to call after th ecall to your application
   logout
(which depends on the used shell and OS)
Lionelh

ASKER
Yes if you could tell me how exactly thats done then we can solve this.
How can I check if the exec command returns 0
Lionelh

ASKER
Sorry I ment to split the points between you and Tintin but I missed the split points button,,,
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
ASKER CERTIFIED SOLUTION
ahoffmann

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Lionelh

ASKER
Yes, but I figured out a way run it the way I need it to without using the EXEC command.  But I'm still confused that identical cluster servers could have such different issues...
Tintin

Obviously not quite identical :-)