Re: [ast-users] [ksh93] interactive ksh always exits 0 on CTRL-D

2013-02-18 Thread Clark WANG
On Sun, Dec 9, 2012 at 10:40 PM, Clark WANG dearv...@gmail.com wrote:

 On Saturday, December 8, 2012, David Korn wrote:

 cc:  ast-users@lists.research.att.com
 Subject: Re: Re: [ast-users] [ksh93] interactive ksh always exits 0 on
 CTRL-D
 

 I see the folling in the RELEASE file:

 12-04-23  A bug in which the exit status for an interactive shell was
 always
   0 has been fixed.

 You should get 1 form any shell after this date unless you have an
 exit trap that would change this.


 Just tried more and found it's caused by having $(...) in my PS1.


93v- 2013-02-13 still has this problem.


 David Korn
 d...@research.att.com


___
ast-users mailing list
ast-users@lists.research.att.com
http://lists.research.att.com/mailman/listinfo/ast-users


Re: [ast-users] [ksh93] interactive ksh always exits 0 on CTRL-D

2012-12-06 Thread Jeffry R. Abramson

On Thu, 6 Dec 2012, David Korn wrote:



Subject: Re: [ast-users] [ksh93] interactive ksh always exits 0 on CTRL-D



Not a big problem but I think it better exit $?.



I tried the following and it did not exit 0.

$ ksh
$ false
^D
$ print $?
1

David Korn
d...@research.att.com
___
ast-users mailing list
ast-users@lists.research.att.com
http://lists.research.att.com/mailman/listinfo/ast-users



I tried the following on Scientific Linux SL release 5.5 x86_64 as well as
on an arm running Ubuntu 12.04 LTS with the same results:

$ ksh
$ print ${.sh.version}
Version JM 93u 2011-02-08
$ false
^D
$ print $?
0
$

Version JM 93u+ 2012-02-29 also returns 0 in this situation.

Jeffry R. Abramson
jabram...@att.com
___
ast-users mailing list
ast-users@lists.research.att.com
http://lists.research.att.com/mailman/listinfo/ast-users


Re: [ast-users] [ksh93] interactive ksh always exits 0 on CTRL-D

2012-12-06 Thread Janis Papanagnou

 Subject: Re: [ast-users] [ksh93] interactive ksh always exits 0 on CTRL-D
 

  Not a big problem but I think it better exit $?.


 I tried the following and it did not exit 0.

 $ ksh
 $ false
 ^D
 $ print $?
 1

 David Korn
 d...@research.att.com

Do we need some specific ksh version to make that work?
Or does that just mean that the behaviour is undefined?

I am running ksh 93t+ 2010-03-05 and above sample as well
returns 0 here in my Ubuntu/Linux 2.6 environment.

(No traps set, BTW.)

  
___
ast-users mailing list
ast-users@lists.research.att.com
http://lists.research.att.com/mailman/listinfo/ast-users