Products Resources Support About Us

EDC5120I when using process substitution variables

I’m getting the following error when using process substitution variables.

DOC:/u/doc: >echo <(ls)
/tmp/sh-np-1121217100
DOC:/u/doc: >-bash: cannot open named pipe /tmp/sh-np-2375982695 for writing: EDC5120I Interrupted function call.

DOC:/u/doc: >bash --version
GNU bash, version 4.3.46(6)-release (i370-ibm-openedition)
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Can you provide the exact text of the commands you are running? In the description above it’s a little hard to tell what’s going on; I think you use “>” as the last character of your prompt, but I’m not sure.

This seems to be working OK for me:

bash-4.3$ diff <(ls -l) <(ls -al)
1c1,3
< total 304
---
> total 336
> drwxr-xr-x   2 TSJLC    PDUSER      8192 Oct 19 09:59 .
> drwxr-xr-x   5 TSJLC    PDUSER      8192 Oct 18 17:17 ..
bash-4.3$

However, I may be using a slightly different version of bash:

bash-4.3$ bash --version
GNU bash, version 4.3.48(2)-release (i370-ibm-openedition)
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
bash-4.3$

That’s correct “>” is the last character of my prompt. Maybe that’s being parsed as a redirection operator? I’ll get the latest version of bash installed and report back.

Hmm, actually, when I did exactly what I think you did, I sometimes get the error:

-bash-4.3$ echo <(ls)
/tmp/sh-np-587233078
-bash-4.3$ -bash: cannot open named pipe /tmp/sh-np-587233078 for writing: EDC5120I Interrupted function call.

-bash-4.3$

Does the command line I tried above: diff <(ls -l) <(ls -al) work for you? This has the smell of some kind of race condition.

I suspect your assumption of a race condition is correct. The spawned process is somehow interrupted.

Your diff worked ok but my example doesn’t and hangs the shell suggesting it’s waiting on the child.

I always get this error. Sometimes immediately, sometimes I get prompt, press Enter and see this error.

It’s broken! Open a ticket?

The test case that fails (using echo) is a bit artificial, in that it generates output that is never going to be read. The more realistic test case (using diff) works.

I will open a ticket, but this will be low priority unless/until a more realistic test case fails.

For Rocket developers: this is PYAN-565.

Agreed, it’s an edge case but the canonical example for displaying the file for a process substitution variable is echo <true) which is how I stumbled across it.

Another nit I have about the Rocket bash port is the delete key doesn’t work. I have to use CTRL+D which is irritating.

This is a common problem, and it’s not limited to the Rocket port.

Put this in your .inputrc file:

"\e[3~": delete-char

It won’t help with emacs shell buffers, but I’m so used to using C-d that I don’t care.

1 Like

Thanks Jerry! I don’t care about emacs shell buffers so +1.

Our young guys used to bash shells on linux hate C-d so great solution.