Date: Sat, 18 Dec 2004 10:10:26 GMT From: Parv <parv@pair.com> To: freebsd-ports-bugs@FreeBSD.org Subject: Re: ports/73404: shells/ksh93 - notify option + output redirected to nonexistent file cause crash w/ segfault Message-ID: <200412181010.iBIAAQ9l016949@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/73404; it has been noted by GNATS. From: Parv <parv@pair.com> To: Joe Kelsey <joe@zircon.seattle.wa.us> Cc: freebsd-gnats-submit@freebsd.org Subject: Re: ports/73404: shells/ksh93 - notify option + output redirected to nonexistent file cause crash w/ segfault Date: Sat, 18 Dec 2004 05:01:13 -0500 in message <1102483426.616.148.camel@zircon.zircon.seattle.wa.us>, wrote Joe Kelsey thusly... > > On Tue, 2004-12-07 at 23:56 -0500, Parv wrote: > > in message <1102478713.616.140.camel@zircon.zircon.seattle.wa.us>, > > wrote Joe Kelsey thusly... > > > > > > Unfortunately, you do not present enough information for me to > > > actually reporduce your problem. > > ... > > > 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? No, i did not mean to use exec along w/ redirection. Above could just as well had echo command prefixed that sent some text to a file which may or may not exist or could actually be a named pipe. As i had expressed in my PR, the code given is/was the minimum example that i could muster to show the crash. In actual usage, i would like to be able to send some messages to a regular file -- which may or may not exist initially -- or a named pipe, in ksh93 too not just in bash, while the shell is going through its initialization w/o crashing. > Do you expect the above redirection to have some other > effect instead of just redirecting the following exec? If you mean this exec usage ... > > exec $0 ... then ... No, i do not expect anything unusal that does not already happen besides the crash. I expect the redirection (in the example code given) to either create a non existing file or truncate the already existing file in background. I expect above quoted exec to execute the shell in which ~/.profile was sourced. > Also, why do you feel the need to put this in a .profile? Does > naming the script file .profile serve any purpose? They are in ~/.profile because ksh93 reads it during initialization, which i have stated above. > Does putting it in some different file make any difference? I have not tried but that would be like putting what goes in .profile in another file AND sourcing that file inside the .profile. - Parv --
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200412181010.iBIAAQ9l016949>