Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Oct 1998 09:57:13 -0500
From:      Chet Ramey <chet@nike.ins.cwru.edu>
To:        cracauer@cons.org
Cc:        green@zone.syracuse.net, Studded@gorean.org, dag-erli@ifi.uio.no, current@FreeBSD.ORG, chet@po.cwru.edu
Subject:   Re: sh and ~ expansion
Message-ID:  <981029145713.AA16764.SM@nike.ins.cwru.edu>
In-Reply-To: Message from cracauer@cons.org of Wed, 28 Oct 1998 18:55:53 %2B0100 (id <19981028185553.A18168@cons.org>)

next in thread | previous in thread | raw e-mail | index | archive | help
> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?981029145713.AA16764.SM>