From Newsgroup: muc.lists.freebsd.stable
--000000000000d10a8406449bf534
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
It's a POSIX-ism. I wasn't paying attention during the 13.x days (last time
I did fbsd was around 5-CURRENT) but I suspect someone pushed for POSIX compliance.
On Thu, Nov 27, 2025 at 6:12=E2=80=AFPM np <
dev@nicolas-provost.fr> wrote:
Probably but I was surprised this is not the same behaviour under 13.x. O=
r
a default option has changed in sh ?
Somewhat strange that a non-existing file does not reset the hash table automatically!
Le 28 novembre 2025 00:02:05 GMT+01:00, Brandon Allbery < allbery.b@gmail.com> a =C3=A9crit :
Don't you have to 'hash -r' after moving cached executables?
On Thu, Nov 27, 2025 at 6:00=E2=80=AFPM np <dev@nicolas-provost.fr> wrot=
e:
Hi,
for example, given a script /usr/local/bin/a.sh which outputs "ok", the=
n
login to a console as root (for simplicity):
root# a.sh
ok
root# mv /usr/local/bin/a.sh /usr/bin
root# a.sh
On 15.0-RC4, sh will report here that a.sh is not found, even if PATH
has /usr/bin. But csh will find it.
On 13.3 the script is found normally (did not check it on 14.x).
Same thing for whatever program you want. Can you confirm this behaviou=
r
?
Cordialement,
N.P.
--=20
brandon s allbery kf8nh
allbery.b@gmail.com
--000000000000d10a8406449bf534
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">It's a POSIX-ism. I wasn't paying attention during=
the 13.x days (last time I did fbsd was around 5-CURRENT) but I suspect so= meone pushed for POSIX compliance.</div><br><div class=3D"gmail_quote gmail= _quote_container"><div dir=3D"ltr" class=3D"gmail_attr">On Thu, Nov 27, 202=
5 at 6:12=E2=80=AFPM np <<a href=3D"mailto:
dev@nicolas-provost.fr">dev@n= icolas-provost.fr</a>> wrote:<br></div><blockquote class=3D"gmail_quote"=
style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);p= adding-left:1ex"><div><div dir=3D"auto">Probably but I was surprised this i=
s not the same behaviour under 13.x. Or a default option has changed in sh = ?<br><br>Somewhat strange that a non-existing file does not reset the hash = table automatically!</div><br><br><div class=3D"gmail_quote"><div dir=3D"au= to">Le 28 novembre 2025 00:02:05 GMT+01:00, Brandon Allbery <<a href=3D"= mailto:
allbery.b@gmail.com" target=3D"_blank">
allbery.b@gmail.com</a>> a=
=C3=A9crit=C2=A0:</div><blockquote class=3D"gmail_quote" style=3D"margin:0=
pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir=3D"ltr">Don't you have to 'hash -r' after moving cache=
d executables?</div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class= =3D"gmail_attr">On Thu, Nov 27, 2025 at 6:00=E2=80=AFPM np <<a href=3D"m= ailto:
dev@nicolas-provost.fr" target=3D"_blank">
dev@nicolas-provost.fr</a>&= gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0=
px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><u></= u><div><div dir=3D"auto">Hi,<br><br>for example, given a script /usr/local/= bin/a.sh which outputs "ok", then login to a console as root (for=
simplicity):<br><br>root# a.sh<br>ok<br>root# mv /usr/local/bin/a.sh /usr/= bin<br>root# a.sh<br><br>On 15.0-RC4, sh will report here that a.sh is not = found, even if PATH has /usr/bin. But csh will find it.<br><br>On 13.3 the = script is found normally (did not check it on 14.x).<br><br>Same thing for = whatever program you want. Can you confirm this behaviour ?<br><br>Cordiale= ment,<br>N.P.</div></div></blockquote></div><div><br clear=3D"all"></div><d= iv><br></div></blockquote></div></div></blockquote></div><div><br clear=3D"= all"></div><div><br></div><span class=3D"gmail_signature_prefix">-- </span>= <br><div dir=3D"ltr" class=3D"gmail_signature"><div dir=3D"ltr"><div><div d= ir=3D"ltr"><div>brandon s allbery kf8nh</div><div><a href=3D"mailto:allbery=
.b@gmail.com" target=3D"_blank">
allbery.b@gmail.com</a></div></div></div></= div></div>
--000000000000d10a8406449bf534--
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to
news-admin@muc.de
--- Synchronet 3.21a-Linux NewsLink 1.2