Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Nov 2006 21:18:35 +0900
From:      "NIIMI Satoshi" <sa2c@sa2c.net>
To:        freebsd-standards@freebsd.org
Subject:   type command bahaviour of FreeBSD's /bin/sh (Fwd: [issue426] hgmerge assumes FileMerge to be exist unconditionally on FreeBSD)
Message-ID:  <7a2b18c80611240418w43776195p340d1ff49ac69786@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
------=_Part_24_2638223.1164370715927
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

[ 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@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@selenic.com>
Cc: mercurial-devel@selenic.com


On 2006-11-21 16:05, NIIMI Satoshi <mercurial-bugs@selenic.com> wrote:
>
> New submission from NIIMI Satoshi <sa2c@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@freebsd.org too, so we
can fix the bug if it is indeed a bug?

- Giorgos



_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@selenic.com
http://selenic.com/mailman/listinfo/mercurial-devel

------=_Part_24_2638223.1164370715927
Content-Type: application/pgp-signature
Content-Transfer-Encoding: base64
X-Attachment-Id: 0.0.1
Content-Disposition: attachment

LS0tLS1CRUdJTiBQR1AgU0lHTkFUVVJFLS0tLS0KVmVyc2lvbjogR251UEcgdjEuNC41IChGcmVl
QlNEKQoKaUQ4REJRRkZZekFLMWcrVUdqR0dBN1lSQW1YMUFKMGJWNGlWazBTY1k3VWZUQmxDRllN
SmNpVHlrUUNnb0NIcApPYVRaeXJ6RVAvcGhMM3l4bzUwSzJKND0KPU41STAKLS0tLS1FTkQgUEdQ
IFNJR05BVFVSRS0tLS0tCgo=
------=_Part_24_2638223.1164370715927--



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