• 15.0-RC4: sh failing to find a file

    From np@dev@nicolas-provost.fr to muc.lists.freebsd.stable on Fri Nov 28 00:00:22 2025
    From Newsgroup: muc.lists.freebsd.stable

    ------ZBCE41DL9NH2Z7RI38BUKVTZQB04W1
    Content-Type: text/plain;
    charset=utf-8
    Content-Transfer-Encoding: quoted-printable

    Hi,

    for example, given a script /usr/local/bin/a=2Esh which outputs "ok", then=
    login to a console as root (for simplicity):

    root# a=2Esh
    ok
    root# mv /usr/local/bin/a=2Esh /usr/bin
    root# a=2Esh

    On 15=2E0-RC4, sh will report here that a=2Esh is not found, even if PATH =
    has /usr/bin=2E But csh will find it=2E

    On 13=2E3 the script is found normally (did not check it on 14=2Ex)=2E

    Same thing for whatever program you want=2E Can you confirm this behaviour=
    ?

    Cordialement,
    N=2EP=2E
    ------ZBCE41DL9NH2Z7RI38BUKVTZQB04W1
    Content-Type: text/html;
    charset=utf-8
    Content-Transfer-Encoding: quoted-printable

    <!DOCTYPE html><html><body><div dir=3D"auto">Hi,<br><br>for example, given =
    a script /usr/local/bin/a=2Esh which outputs "ok", then login to a console =
    as root (for simplicity):<br><br>root# a=2Esh<br>ok<br>root# mv /usr/local/= bin/a=2Esh /usr/bin<br>root# a=2Esh<br><br>On 15=2E0-RC4, sh will report he=
    re that a=2Esh is not found, even if PATH has /usr/bin=2E But csh will find=
    it=2E<br><br>On 13=2E3 the script is found normally (did not check it on 1= 4=2Ex)=2E<br><br>Same thing for whatever program you want=2E Can you confir=
    m this behaviour ?<br><br>Cordialement,<br>N=2EP=2E</div></body></html> ------ZBCE41DL9NH2Z7RI38BUKVTZQB04W1--


    --
    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
  • From Brandon Allbery@allbery.b@gmail.com to muc.lists.freebsd.stable on Thu Nov 27 18:02:05 2025
    From Newsgroup: muc.lists.freebsd.stable

    --0000000000002493c706449b812a
    Content-Type: text/plain; charset="UTF-8"
    Content-Transfer-Encoding: quoted-printable

    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> wrote:

    Hi,

    for example, given a script /usr/local/bin/a.sh which outputs "ok", then 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 behaviour =
    ?

    Cordialement,
    N.P.



    --=20
    brandon s allbery kf8nh
    allbery.b@gmail.com

    --0000000000002493c706449b812a
    Content-Type: text/html; charset="UTF-8"
    Content-Transfer-Encoding: quoted-printable

    <div dir=3D"ltr">Don&#39;t you have to &#39;hash -r&#39; after moving cache=
    d executables?</div><br><div class=3D"gmail_quote gmail_quote_container"><d=
    iv dir=3D"ltr" class=3D"gmail_attr">On Thu, Nov 27, 2025 at 6:00=E2=80=AFPM=
    np &lt;<a href=3D"mailto:dev@nicolas-provost.fr">dev@nicolas-provost.fr</a= >&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px=
    0px 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/loca= l/bin/a.sh which outputs &quot;ok&quot;, then login to a console as root (f=
    or simplicity):<br><br>root# a.sh<br>ok<br>root# mv /usr/local/bin/a.sh /us= r/bin<br>root# a.sh<br><br>On 15.0-RC4, sh will report here that a.sh is no=
    t found, even if PATH has /usr/bin. But csh will find it.<br><br>On 13.3 th=
    e script is found normally (did not check it on 14.x).<br><br>Same thing fo=
    r whatever program you want. Can you confirm this behaviour ?<br><br>Cordia= lement,<br>N.P.</div></div></blockquote></div><div><br clear=3D"all"></div>= <div><br></div><span class=3D"gmail_signature_prefix">-- </span><br><div di= r=3D"ltr" class=3D"gmail_signature"><div dir=3D"ltr"><div><div dir=3D"ltr">= <div>brandon s allbery kf8nh</div><div><a href=3D"mailto:allbery.b@gmail.co=
    m" target=3D"_blank">allbery.b@gmail.com</a></div></div></div></div></div>

    --0000000000002493c706449b812a--


    --
    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
  • From np@dev@nicolas-provost.fr to muc.lists.freebsd.stable on Fri Nov 28 00:12:19 2025
    From Newsgroup: muc.lists.freebsd.stable

    ------ZALYQN8J9X8G3S34AAHB22A5E9SRF2
    Content-Type: text/plain;
    charset=utf-8
    Content-Transfer-Encoding: quoted-printable

    Probably but I was surprised this is not the same behaviour under 13=2Ex=2E=
    Or a default option has changed in sh ?

    Somewhat strange that a non-existing file does not reset the hash table au= tomatically!

    Le 28 novembre 2025 00:02:05 GMT+01:00, Brandon Allbery <allbery=2Eb@gmail= =2Ecom> a =C3=A9crit=C2=A0:
    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=2Efr> wro=
    te:

    Hi,

    for example, given a script /usr/local/bin/a=2Esh which outputs "ok", t=
    hen
    login to a console as root (for simplicity):

    root# a=2Esh
    ok
    root# mv /usr/local/bin/a=2Esh /usr/bin
    root# a=2Esh

    On 15=2E0-RC4, sh will report here that a=2Esh is not found, even if PA=
    TH has
    /usr/bin=2E But csh will find it=2E

    On 13=2E3 the script is found normally (did not check it on 14=2Ex)=2E

    Same thing for whatever program you want=2E Can you confirm this behavi=
    our ?

    Cordialement,
    N=2EP=2E



    --=20
    brandon s allbery kf8nh
    allbery=2Eb@gmail=2Ecom

    ------ZALYQN8J9X8G3S34AAHB22A5E9SRF2
    Content-Type: text/html;
    charset=utf-8
    Content-Transfer-Encoding: quoted-printable

    <html><head></head><body><div dir=3D"auto">Probably but I was surprised thi=
    s is not the same behaviour under 13=2Ex=2E Or a default option has changed=
    in sh ?<br><br>Somewhat strange that a non-existing file does not reset th=
    e hash table automatically!</div><br><br><div class=3D"gmail_quote"><div di= r=3D"auto">Le 28 novembre 2025 00:02:05 GMT+01:00, Brandon Allbery &lt;allb= ery=2Eb@gmail=2Ecom&gt; a =C3=A9crit=C2=A0:</div><blockquote class=3D"gmail= _quote" style=3D"margin: 0pt 0pt 0pt 0=2E8ex; border-left: 1px solid rgb(20=
    4, 204, 204); padding-left: 1ex;">
    <div dir=3D"ltr">Don't you have to 'hash -r' after moving cached executabl= es?</div><br><div class=3D"gmail_quote gmail_quote_container"><div dir=3D"l= tr" class=3D"gmail_attr">On Thu, Nov 27, 2025 at 6:00=E2=80=AFPM np &lt;<a = href=3D"mailto:dev@nicolas-provost=2Efr">dev@nicolas-provost=2Efr</a>&gt; w= rote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0p=
    x 0=2E8ex;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=2Esh which outputs "ok", then login to a console as root (for simplicity= ):<br><br>root# a=2Esh<br>ok<br>root# mv /usr/local/bin/a=2Esh /usr/bin<br>= root# a=2Esh<br><br>On 15=2E0-RC4, sh will report here that a=2Esh is not f= ound, even if PATH has /usr/bin=2E But csh will find it=2E<br><br>On 13=2E3=
    the script is found normally (did not check it on 14=2Ex)=2E<br><br>Same t= hing for whatever program you want=2E Can you confirm this behaviour ?<br><= br>Cordialement,<br>N=2EP=2E</div></div></blockquote></div><div><br clear= =3D"all"></div><div><br></div></blockquote></div></body></html> ------ZALYQN8J9X8G3S34AAHB22A5E9SRF2--


    --
    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
  • From Brandon Allbery@allbery.b@gmail.com to muc.lists.freebsd.stable on Thu Nov 27 18:34:43 2025
    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&#39;s a POSIX-ism. I wasn&#39;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 &lt;<a href=3D"mailto:dev@nicolas-provost.fr">dev@n= icolas-provost.fr</a>&gt; 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 &lt;<a href=3D"= mailto:allbery.b@gmail.com" target=3D"_blank">allbery.b@gmail.com</a>&gt; 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&#39;t you have to &#39;hash -r&#39; 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 &lt;<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 &quot;ok&quot;, 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
  • From np@dev@nicolas-provost.fr to muc.lists.freebsd.stable on Fri Nov 28 11:05:07 2025
    From Newsgroup: muc.lists.freebsd.stable

    ------F7V3M3HXW1RU661Y5MDYUOWFSTUIU9
    Content-Type: text/plain;
    charset=utf-8
    Content-Transfer-Encoding: quoted-printable

    POSIX 2=2E9=2E1=2E1:
    "If the remembered location fails for a subsequent invocation, the shell s= hall
    repeat the search to find the new location for the utility, if any=2E"

    Le 28 novembre 2025 00:34:43 GMT+01:00, Brandon Allbery <allbery=2Eb@gmail= =2Ecom> a =C3=A9crit=C2=A0:
    It's a POSIX-ism=2E I wasn't paying attention during the 13=2Ex days (las=
    t time
    I did fbsd was around 5-CURRENT) but I suspect someone pushed for POSIX >compliance=2E

    On Thu, Nov 27, 2025 at 6:12=E2=80=AFPM np <dev@nicolas-provost=2Efr> wro=
    te:

    Probably but I was surprised this is not the same behaviour under 13=2E= x=2E Or
    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=2Eb@gmail=2Ecom> 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=2Efr> = wrote:

    Hi,

    for example, given a script /usr/local/bin/a=2Esh which outputs "ok",=
    then
    login to a console as root (for simplicity):

    root# a=2Esh
    ok
    root# mv /usr/local/bin/a=2Esh /usr/bin
    root# a=2Esh

    On 15=2E0-RC4, sh will report here that a=2Esh is not found, even if = PATH
    has /usr/bin=2E But csh will find it=2E

    On 13=2E3 the script is found normally (did not check it on 14=2Ex)=
    =2E

    Same thing for whatever program you want=2E Can you confirm this beha= viour
    ?

    Cordialement,
    N=2EP=2E





    --=20
    brandon s allbery kf8nh
    allbery=2Eb@gmail=2Ecom

    ------F7V3M3HXW1RU661Y5MDYUOWFSTUIU9
    Content-Type: text/html;
    charset=utf-8
    Content-Transfer-Encoding: quoted-printable

    <html><head></head><body><div dir=3D"auto">POSIX 2=2E9=2E1=2E1:<br>"If the = remembered location fails for a subsequent invocation, the shell shall<br>r= epeat the search to find the new location for the utility, if any=2E"</div>= <br><br><div class=3D"gmail_quote"><div dir=3D"auto">Le 28 novembre 2025 00= :34:43 GMT+01:00, Brandon Allbery &lt;allbery=2Eb@gmail=2Ecom&gt; a =C3=A9c= rit=C2=A0:</div><blockquote class=3D"gmail_quote" style=3D"margin: 0pt 0pt = 0pt 0=2E8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"=

    <div dir=3D"ltr">It's a POSIX-ism=2E I wasn't paying attention during the = 13=2Ex days (last time I did fbsd was around 5-CURRENT) but I suspect someo=
    ne pushed for POSIX compliance=2E</div><br><div class=3D"gmail_quote gmail_= quote_container"><div dir=3D"ltr" class=3D"gmail_attr">On Thu, Nov 27, 2025=
    at 6:12=E2=80=AFPM np &lt;<a href=3D"mailto:dev@nicolas-provost=2Efr">dev@= nicolas-provost=2Efr</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quo= te" style=3D"margin:0px 0px 0px 0=2E8ex;border-left:1px solid rgb(204,204,2= 04);padding-left:1ex"><div><div dir=3D"auto">Probably but I was surprised t= his is not the same behaviour under 13=2Ex=2E Or a default option has chang=
    ed 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"auto">Le 28 novembre 2025 00:02:05 GMT+01:00, Brandon Allbery &lt;<a=
    href=3D"mailto:allbery=2Eb@gmail=2Ecom" target=3D"_blank">allbery=2Eb@gmai= l=2Ecom</a>&gt; a =C3=A9crit&nbsp;:</div><blockquote class=3D"gmail_quote" = style=3D"margin:0pt 0pt 0pt 0=2E8ex;border-left:1px solid rgb(204,204,204);= padding-left:1ex">
    <div dir=3D"ltr">Don't you have to 'hash -r' after moving cached executabl= es?</div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_att= r">On Thu, Nov 27, 2025 at 6:00=E2=80=AFPM np &lt;<a href=3D"mailto:dev@nic= olas-provost=2Efr" target=3D"_blank">dev@nicolas-provost=2Efr</a>&gt; wrote= :<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0= =2E8ex;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= =2Esh which outputs "ok", then login to a console as root (for simplicity):= <br><br>root# a=2Esh<br>ok<br>root# mv /usr/local/bin/a=2Esh /usr/bin<br>ro= ot# a=2Esh<br><br>On 15=2E0-RC4, sh will report here that a=2Esh is not fou= nd, even if PATH has /usr/bin=2E But csh will find it=2E<br><br>On 13=2E3 t=
    he script is found normally (did not check it on 14=2Ex)=2E<br><br>Same thi=
    ng for whatever program you want=2E Can you confirm this behaviour ?<br><br= >Cordialement,<br>N=2EP=2E</div></div></blockquote></div><div><br clear=3D"= all"></div><div><br></div></blockquote></div></div></blockquote></div><div>= <br clear=3D"all"></div><div><br></div></blockquote></div></body></html> ------F7V3M3HXW1RU661Y5MDYUOWFSTUIU9--


    --
    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