From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Dec 18 10:10:27 2004 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6C6FC16A4CE for ; Sat, 18 Dec 2004 10:10:27 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 39DD043D48 for ; Sat, 18 Dec 2004 10:10:27 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id iBIAAQNs016950 for ; Sat, 18 Dec 2004 10:10:26 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id iBIAAQ9l016949; Sat, 18 Dec 2004 10:10:26 GMT (envelope-from gnats) Date: Sat, 18 Dec 2004 10:10:26 GMT Message-Id: <200412181010.iBIAAQ9l016949@freefall.freebsd.org> To: freebsd-ports-bugs@FreeBSD.org From: Parv Subject: Re: ports/73404: shells/ksh93 - notify option + output redirected to nonexistent file cause crash w/ segfault X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Parv List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Dec 2004 10:10:27 -0000 The following reply was made to PR ports/73404; it has been noted by GNATS. From: Parv To: Joe Kelsey 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 --