Re: execute_cmd.h is not included in installed headers

2022-05-02 Thread Robert E. Griffith
>> That seems reasonable. I'll add it. Cool, thanks. --BobG On 5/2/22 16:47, Chet Ramey wrote: On 5/2/22 4:03 PM, Robert E. Griffith wrote:  >> What's your use case? I have a bash script library that supports Objects and Classes in bash script. I am now writing a loadable builtin to speed u

Re: execute_cmd.h is not included in installed headers

2022-05-02 Thread Chet Ramey
On 5/2/22 4:03 PM, Robert E. Griffith wrote: >> What's your use case? I have a bash script library that supports Objects and Classes in bash script. I am now writing a loadable builtin to speed up the object call and other mechanisms. echo "'$obj'" '_bgclassCall heap_A_X MyClass

Re: execute_cmd.h is not included in installed headers

2022-05-02 Thread Robert E. Griffith
>> What's your use case? I have a bash script library that supports Objects and Classes in bash script. I am now writing a loadable builtin to speed up the object call and other mechanisms. echo "'$obj'" '_bgclassCall heap_A_X MyClass 0 |' $obj.doSomething p1 p2 _bgclassCall is

Re: execute_cmd.h is not included in installed headers

2022-05-02 Thread Chet Ramey
On 5/2/22 3:23 PM, Robert E. Griffith wrote: "execute_cmd.h" is not listed in the INSTALLED_HEADERS macro which determines which headers are included for the install-headers target. Yes, builtin commands are generally the target of execution, not things that execute other builtins or shell func

execute_cmd.h is not included in installed headers

2022-05-02 Thread Robert E. Griffith
"execute_cmd.h" is not listed in the INSTALLED_HEADERS macro which determines which headers are included for the install-headers target. Is it problematic for a loadable builtin to execute shell functions or is it maybe an oversight that that header is not included? If I build against the full

Re: bash 5.1 heredoc pipes problematic, shopt needed

2022-05-02 Thread Jesse Hathaway
On Mon, May 2, 2022 at 9:53 AM Chet Ramey wrote: > My preference is a portable memfd_create(); I think I could get around > its limitations. I'm sure you can google with the best of them, but I did come across this project which did some work trying to create a portable version of memfd_create(),

Re: [PATCH] fix bug in print loadable builtin

2022-05-02 Thread Chet Ramey
On 5/2/22 11:28 AM, Emanuele Torre wrote: ansicstr() returns NULL when the string argument is the empty string, so passing its return value to fprintf() will cause a segmentation fault. Thanks for the report. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars

[PATCH] fix bug in print loadable builtin

2022-05-02 Thread Emanuele Torre
ansicstr() returns NULL when the string argument is the empty string, so passing its return value to fprintf() will cause a segmentation fault. That happened when one of the arguments was the empty string and the `-r' option was not used. example: bash-5.1$ enable -f /usr/lib/bash/print print

Re: bash 5.1 heredoc pipes problematic, shopt needed

2022-05-02 Thread Chet Ramey
On 4/28/22 10:39 PM, Ángel wrote: On 2022-04-25 at 10:40 -0400, Chet Ramey wrote: Perhaps BASH_COMPAT=5.0 could be extended to handle this. I think a shopt makes more sense. Forcing heredocs to be files although something legit to request, is more a caller workaround to bugs in called programs

Re: Bug in documentation (man)

2022-05-02 Thread Gasan
I like it! Op ma 2 mei 2022 15:05 schreef Chet Ramey : > On 4/29/22 12:43 PM, Gasan wrote: > > Hi Gnu, > > > > I bash 5.1 man it says that pipeline may consist of single command. So > > "echo foo" is a pipeline. It also says that each command in pipeline runs > > in a subshell, therefore "echo fo

Re: Bug in documentation (man)

2022-05-02 Thread Chet Ramey
On 4/29/22 12:43 PM, Gasan wrote: Hi Gnu, I bash 5.1 man it says that pipeline may consist of single command. So "echo foo" is a pipeline. It also says that each command in pipeline runs in a subshell, therefore "echo foo" runs in a subshell. But thats not true. That's true. How about "each co