Hi Paul, Thank you for your response.
This issue has been observed in z/OS version 2.5 and later. I am currently discussing it with the z/OS platform team. As a workaround, we installed a signal handler for SIGPIPE that invokes _exit(141). Once the final changes are determined, I’ll propose a fix upstream. Best regards, Sachin On Wed, Dec 11, 2024 at 11:24 PM Paul Eggert <egg...@cs.ucla.edu> wrote: > On 2024-12-11 04:59, Sachin T wrote: > > Could you suggest the preferred solution for handling this situation on > the > > z/OS platform? > > Since this problem afflicts many applications (not just grep), the > preferred solution would be to fix z/OS so that a process terminated by > a signal has the exit status corresponding to the signal, even if the > signal arrives during calls by 'exit' to functions registered by > 'atexit'. This is required by POSIX[1] and is what other systems do. Is > that something you could start the ball rolling on? (I don't use z/OS > and so cannot file bug reports for it.) > > I don't see any straightforward change to 'grep' that would work around > the z/OS problem. However, if you can think of a change, please let us > know. > > Also, could you please let us know the z/OS version so that I can > document this portability problem in Gnulib? Thanks. > > [1]: > > https://pubs.opengroup.org/onlinepubs/9799919799/functions/V2_chap02.html#tag_16_04_03_01 >