Free Downloads, Community Forum,
FAQs and Developer Resources


Make /Tools Your Home | Link to us

Today's posts | Posts since last visit | Most Active Topics

All Forums Register Login Search Subscriptions My Profile Inbox
Tool Warehouse FAQs Resources Help Member List Address Book Logout

Sub shell not preserving $PWD (how to default 'physical' to off)?

 
Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [SFU / Interix / SUA Technology] >> SFU / Interix - Getting Started >> Sub shell not preserving $PWD (how to default 'physical' to off)? Page: [1]
Login
Message << Older Topic   Newer Topic >>
Sub shell not preserving $PWD (how to default 'physical... - May 8, '06, 5:26:50 PM   
Ron

 

Posts: 77
Joined: May 21, '03,
Status: offline
The ksh that is included in SFU 3.5 or SUA (R2) has the 'physical' option set 'on' as the default which is different from how OpenServer and Linux have their ksh set. How can I change the default to be 'off'? I have tried placing 'set +o physical' in /etc/profile.lcl, I have also tried placing 'set +o physical' in my /etc/kshrc (which my $ENV is set to) but nothing works.

Here is the particular scenario:
If I 'cd' into a symbolic link which is a directory and then start up a sub-shell, the sub-shell's $PWD will be set to the physical location and not to the logical location of the directory.

For instance:
$ set –o
Current option settings
allexport      off  interactive    on   nolog          off  verbose        off
braceexpand    on   keyword        off  notify         off  vi             on
bgnice         off  login          on   nounset        off  viraw          off
cmd_intitle    off  markdirs       off  physical       off  vi-show8       off
debug          off  monitor        on   posix          off  vi-tabcomplete off
emacs          off  noclobber      off  privileged     off  vi-esccomplete off
errexit        off  noexec         off  restricted     off  xtrace         off
gmacs          off  noglob         off  stdin          on
ignoreeof      off  nohup          on   trackall       off
$ ln –s /usr/sbin /sbin
$ cd /sbin
$ pwd
/sbin            <--- logical location, OK
$ sh
$ set –o
Current option settings
allexport      off  interactive    on   nolog          off  verbose        off
braceexpand    on   keyword        off  notify         off  vi             on
bgnice         off  login          off  nounset        off  viraw          off
cmd_intitle    off  markdirs       off  physical       off  vi-show8       off
debug          off  monitor        on   posix          off  vi-tabcomplete off
emacs          off  noclobber      off  privileged     off  vi-esccomplete off
errexit        off  noexec         off  restricted     off  xtrace         off
gmacs          off  noglob         off  stdin          on
ignoreeof      off  nohup          on   trackall       off
$ pwd
/usr/sbin       <--- physical location, should show logical.
Post #: 1
RE: Sub shell not preserving $PWD (how to default 'phys... - May 8, '06, 5:37:02 PM   
Ron

 

Posts: 77
Joined: May 21, '03,
Status: offline
Take note that in the previous example 'set +o physical' was set in my /etc/kshrc ($ENV file), that's why you see it set to 'off' after I started the sub-shell.

Ron

< Message edited by Ron -- May 9, '06, 8:18:01 AM >

(in reply to Ron)
Post #: 2
RE: Sub shell not preserving $PWD (how to default 'phys... - May 8, '06, 6:28:02 PM   
Rodney

 

Posts: 3728
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
mmm, interesting.
I just tried it against the update I did for Interix 6.0 (Vista) with different results.
I got the subshell with PWD as the logical location and 'pwd' giving logical.
So it was a fix in pdksh between verion 5.12 and 5.14. So the fix will appear in Vista.
I don't know if an update is being released for 5.2 (R2) by MS. I'll ask.

(in reply to Ron)
Post #: 3
Page:   [1]
All Forums >> [SFU / Interix / SUA Technology] >> SFU / Interix - Getting Started >> Sub shell not preserving $PWD (how to default 'physical' to off)? Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Search All Forums -

Advanced search


SPONSORS



Forum Software © ASPPlayground.NET Advanced Edition 2.5 ANSI

0.031