Problem with pipes %SYSTEM-E-ENO11

  • George James

    George James - 2012-03-28

    When writing data to a FIFO device (a named pipe) I randomly get the following error:
    %SYSTEM-E-ENO11, Resource temporarily unavailable

    This seems to have started happening in V5.5.  With the same code it didn't happen in V5.4.

    Here's some code that reproduces the problem:

    GTM>w $zv
    GT.M V5.5-000 Linux x86_64
    GTM>zp ^pipe
    pipe    ; Test output to named pipe
            zsystem "mkfifo output.pipe; cat <output.pipe >output.txt &"
            s pipe="output.pipe"
            o pipe:(nowrap:stream:fifo)
            u pipe
            f i=1:1 w $r(1000000)
            c pipe
    GTM>d ^pipe
    %SYSTEM-E-ENO11, Resource temporarily unavailable

    The device remains open and any subsequent output is successfully written to the device so the pipe is not broken.

    Any ideas what might be causing this?

  • K.S. Bhaskar

    K.S. Bhaskar - 2012-03-28

    I suspect what is happening is that the FIFO is full, and waiting for the cat process to consume data already written. Once it is consumed, subsequent access works.

  • K.S. Bhaskar

    K.S. Bhaskar - 2012-03-28

    There is an error in the GT.M documentation.  Although it says that writes to FIFO devices are blocking, the actual behavior is like the PIPE device.  Please refer to the PIPE device documentation for now (see relevant extract. below).  We will fix the documentation for FIFO devices.

    The PIPE device does non-blocking writes. If a process tries to WRITE to a full PIPE and the WRITE would block the device implicitly tries to complete the operation up to10 times. If the implicit retries don't succeed (remain blocked), the WRITE sets $DEVICE to "1,Resource temporarily unavailable", $ZA to 9, and produces an error. If the GT.M process has defined an EXCEPTION, $ETRAP or $ZTRAP, the error trap may choose to retry the WRITE after some action or delay that might remove data from the pipe.

    Thanks for bringing this to our attention.


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks