How to redirect RUNTIME ERRORS to STDERR?

后端 未结 2 818
栀梦
栀梦 2021-01-06 12:23

I have a C program that uses PIPES to communicate with an external application.

I use EXECL for this:

execl(\"./errorprogram\",\"./errorprogram\", N         


        
2条回答
  •  再見小時候
    2021-01-06 12:45

    By default, Glibc will produce output on the process's controlling terminal, if one exists. It sounds like you want to set the environment variable LIBC_FATAL_STDERR_=1, which will instead send fatal errors to stderr always.

提交回复
热议问题