type command bahaviour of FreeBSD's /bin/sh (Fwd: [issue426]
hgmerge assumes FileMerge to be exist unconditionally on FreeBSD)
NIIMI Satoshi
sa2c at sa2c.net
Fri Nov 24 12:18:37 UTC 2006
[ Please CC me when reply since I don't subscribe this list. ]
Hi,
FreeBSD's /bin/sh produces:
| % sh -c 'type /nonexistent; echo $?'
| /nonexistent: No such file or directory
| 0
whereas
| % bash -c 'type /nonexistent; echo $?'
| bash: line 0: type: /nonexistent: not found
| 1
| ksh -c 'type /nonexistent; echo $?'
| /nonexistent: not found
| 1
Does the current behaviour of /bin/sh's type command conform to the standards?
Thanks,
--
NIIMI Satoshi
---------- Forwarded message ----------
From: Giorgos Keramidas <keramida at freebsd.org>
Date: 2006/11/22 1:57
Subject: Re: [issue426] hgmerge assumes FileMerge to be exist
unconditionally on FreeBSD
To: NIIMI Satoshi <mercurial-bugs at selenic.com>
Cc: mercurial-devel at selenic.com
On 2006-11-21 16:05, NIIMI Satoshi <mercurial-bugs at selenic.com> wrote:
>
> New submission from NIIMI Satoshi <sa2c at sa2c.net>:
>
> There is a problem in type command of FreeBSD like:
> | % sh -c 'type /nonexistent; echo $?'
> | /nonexistent: No such file or directory
> | 0
>
> Because of the above feature (bug?), testing
> "/Developer/.../FileMerge" always succeeds and used unconditionally.
> I made a patch to work around this.
The Single Unix Specification version 3 (c.f. page [1]) does not specify
if it's an error *not* to find the 'name' argumennt of type(1), so I am
not sure if this is a bug of FreeBSD's /bin/sh shell.
[1] http://www.opengroup.org/onlinepubs/009695399/utilities/type.html#tag_04_150
Can you please forward this to freebsd-standards at freebsd.org too, so we
can fix the bug if it is indeed a bug?
- Giorgos
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel at selenic.com
http://selenic.com/mailman/listinfo/mercurial-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-standards/attachments/20061124/80b8c7a2/attachment.pgp
More information about the freebsd-standards
mailing list