bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: loadables/rm not POSIX compliant


From: Chet Ramey
Subject: Re: loadables/rm not POSIX compliant
Date: Tue, 28 May 2019 10:38:29 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.7.0

On 5/28/19 8:32 AM, Tim Rühsen wrote:

> configure: error: Your 'rm' program is bad, sorry.
> #########
> 
> Is it possible to fix the loadable 'rm' command ?
> Let me know if you want me to provide a patch.

Well, it's hard to know exactly what the problem is here, despite the
volumes of text produced, because the error message doesn't include the
command it tried.

I assume we can fix this particular problem by having rm return 0 if there
aren't any operands and -f was supplied. That fix is attached.

If it's somthing else, there is code in bash, used by the loadable
builtins, to return a special status that causes the execution code to fall
back to the disk version of a command. The `rm' loadable already uses it
for `-i'. We just need to add it for additional cases.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/

Attachment: loadable-rm-f.patch
Description: Text document

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]