z/OS Tools & Language

Expand all | Collapse all

EDC5120I when using process substitution variables

  • 1.  EDC5120I when using process substitution variables

    Posted 10-19-2017 05:28

    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.


  • 2.  RE: EDC5120I when using process substitution variables

    Posted 10-19-2017 10:20

    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$
    


  • 3.  RE: EDC5120I when using process substitution variables

    Posted 10-19-2017 10:29

    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.



  • 4.  RE: EDC5120I when using process substitution variables

    Posted 10-19-2017 10:46

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



  • 5.  RE: EDC5120I when using process substitution variables

    Posted 10-19-2017 11:11

    It’s broken! Open a ticket?



  • 6.  RE: EDC5120I when using process substitution variables

    Posted 10-19-2017 11:48

    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.



  • 7.  RE: EDC5120I when using process substitution variables

    Posted 10-19-2017 12:02

    For Rocket developers: this is PYAN-565.



  • 8.  RE: EDC5120I when using process substitution variables

    Posted 10-19-2017 10:26

    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.



  • 9.  RE: EDC5120I when using process substitution variables

    Posted 10-19-2017 10:35

    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.



  • 10.  RE: EDC5120I when using process substitution variables

    Posted 10-20-2017 08:51

    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.



  • 11.  RE: EDC5120I when using process substitution variables

    Posted 10-20-2017 09:39

    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.



  • 12.  RE: EDC5120I when using process substitution variables

    Posted 10-20-2017 09:45

    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.