ports/73404: shells/ksh93 - notify option + output redirected to nonexistent file cause crash w/ segfault

Joe Kelsey joe at zircon.seattle.wa.us
Wed Dec 8 05:30:33 UTC 2004


The following reply was made to PR ports/73404; it has been noted by GNATS.

From: Joe Kelsey <joe at zircon.seattle.wa.us>
To: Parv <parv at pair.com>
Cc: freebsd-gnats-submit at freebsd.org
Subject: Re: ports/73404: shells/ksh93 - notify option + output redirected
	to nonexistent file cause crash w/ segfault
Date: Tue, 07 Dec 2004 21:23:46 -0800

 On Tue, 2004-12-07 at 23:56 -0500, Parv wrote:
 > in message <1102478713.616.140.camel at zircon.zircon.seattle.wa.us>,
 > wrote Joe Kelsey thusly...
 > >
 > > Unfortunately, you do not present enough information for me to
 > > actually reporduce your problem.
 > > 
 > > I am uncertain exactly what method you use to actually invoke
 > > ksh93 and cause it to dump core.
 > ...
 > > If you can give me an actual command line which causes the
 > > problem, then maybe I can attempt to debug the problem.  Simply
 > > stating that you invoke it from bash really is not helpful.
 > 
 > The PR has everything in it.  Yes, simply invoking from another
 > (interactive) shell does not cause crash, only under a particular
 > situation.
 > 
 > To reiterate & rephrase,  edit "~/.profile" to have ...
 > 
 >   ENV="${HOME}/.kshrc-segfault"
 >   export ENV
 >   rm -f initially-nonexistent-file
 >   > initially-nonexistent-file &
 
 What effect do you expect the redirection with & to have?  Why exactly
 do you use this particular idiom?  It does not make any sense to me.  Do
 you really mean to actually use exec with redirection?  Do you expect
 the above redirection to have some other effect instead of just
 redirecting the following exec?  I really do not get the point of this
 particular line.
 
 Also, why do you feel the need to put this in a .profile?  Does naming
 the script file .profile serve any purpose?  Does putting it in some
 different file make any difference?
 
 You use a lot of strange idioms in this example.
 
 >   exec $0
 > 
 > 
 > ... and, edit "~/.kshrc-segfault" to have only ...
 > 
 >   set -o notify
 > 
 > 
 > ... then in an interactive shell (tcsh, sh, bash, ksh93), type the
 > following in order ...
 > 
 > 
 >   ksh93         # run ksh93 under another shell
 >   . ~/.profile  # source ~/.profile under ksh93
 > 
 > 
 > ...which ends in a crash, if the first time does not produce crash,
 > 2d time sure does.  Following was also tried, in order, just in
 > case, resulting in the same...
 > 
 >   # Change tcsh to sh, bash, or even ksh93 (in which case, no need for
 >   # the 2d step)
 >   xterm -e tcsh  # 1
 >   ksh93          # 2
 >   . ~/.profile   # 3
 > 
 > 
 >   - Parv
 > 
 



More information about the freebsd-ports-bugs mailing list