On Tue, Oct 03, 2023 at 12:54:45PM +0000, queency jones via Bug reports for the 
GNU Bourne Again SHell wrote:
> BASH_VERSION='5.1.4(1)-release'PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"no 
> compile needed
> i made a fifo file by typing: mkfifo gdbout.fifo
> i coded a resource file named  : command.bashthe file code is :aa(){ gdb 
> ./hello_wordl.out > gdbout.fifo & }
> i loaded the resource file by typing in bash shell:       .com.bash
> then run the function aa
> when i typed: ps i got 2 bash jobs instead of 1 bash and 1 gdb !

Your function runs a background subshell which opens a named pipe before
executing gdb.  Opening a named pipe will block, until the named pipe is
opened a *second* time in the opposite direction.  (Since your function
opens it for writing, you need a second process to open it for reading.)

Once the named pipe is opened a second time, the background subshell
will be able to continue, to execute gdb.  Until then, however, it's
still a bash process.

  • bug: queency jones via Bug reports for the GNU Bourne Again SHell
    • Re: bug: Greg Wooledge

Reply via email to