From owner-freebsd-current Thu Oct 29 07:03:54 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id HAA03682 for freebsd-current-outgoing; Thu, 29 Oct 1998 07:03:54 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from nike.ins.cwru.edu (nike.INS.CWRU.Edu [129.22.8.219]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id HAA03592 for ; Thu, 29 Oct 1998 07:03:14 -0800 (PST) (envelope-from chet@nike.ins.cwru.edu) Received: (chet@localhost) by nike.ins.cwru.edu (8.8.7/CWRU-2.5-bsdi) id KAA16785; Thu, 29 Oct 1998 10:02:36 -0500 (EST) (from chet) Date: Thu, 29 Oct 1998 09:57:13 -0500 From: Chet Ramey To: cracauer@cons.org Subject: Re: sh and ~ expansion Cc: green@zone.syracuse.net, Studded@gorean.org, dag-erli@ifi.uio.no, current@FreeBSD.ORG, chet@po.cwru.edu Reply-To: chet@po.cwru.edu In-Reply-To: Message from cracauer@cons.org of Wed, 28 Oct 1998 18:55:53 +0100 (id <19981028185553.A18168@cons.org>) Message-ID: <981029145713.AA16764.SM@nike.ins.cwru.edu> Read-Receipt-To: chet@po.CWRU.Edu Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Also, like bash pdksh fails to execute traps while a child that blocks > signals is running. Consider this: > > #! /bin/sh > trap 'echo aborting ; exit 1' 2 > ./hardguy-that-blocks-sigint > > In bash and pdksh, the trap will be run *after* the blocking child > exited, while in our sh it will run the trap immediatly. The bash/pdksh behavior is required by POSIX.2, section 3.11. The FreeBSD sh is non-compliant. > And I don't like that pdksh doesn't do > . lib.sh > if lib.sh is in the current directory, is not executable and '.' is > not the $PATH. You have to use '. ./lib.sh' instead. Again, the pdksh behavior obeys POSIX.2 to the letter. Bash defaults to the current directory after looking in $PATH, but that is an extension. I assume that the FreeBSD sh does the same. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer Chet Ramey, Case Western Reserve University Internet: chet@po.CWRU.Edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message