MCPcopy Create free account
hub / github.com/apache/cloudberry / restore_sigpipe_trap

Function restore_sigpipe_trap

src/fe_utils/print.c:2948–2954  ·  view source on GitHub ↗

* restore_sigpipe_trap * * Restore normal SIGPIPE interrupt --- call this when done writing to a * temporary query output file that was (or might have been) a pipe. * * Note: within psql, we enable SIGPIPE interrupts unless the permanent query * output file is a pipe, in which case they should be kept off. This * approach works only because psql is not currently complicated enough to * ha

Source from the content-addressed store, hash-verified

2946 * No-op on Windows, where there's no SIGPIPE interrupts.
2947 */
2948void
2949restore_sigpipe_trap(void)
2950{
2951#ifndef WIN32
2952 pqsignal(SIGPIPE, always_ignore_sigpipe ? SIG_IGN : SIG_DFL);
2953#endif
2954}
2955
2956/*
2957 * set_sigpipe_trap_state

Callers 8

PageOutputFunction · 0.85
ClosePagerFunction · 0.85
do_copyFunction · 0.85
setQFoutFunction · 0.85
PrintQueryTuplesFunction · 0.85
ProcessResultFunction · 0.85
ExecQueryUsingCursorFunction · 0.85
exec_command_writeFunction · 0.85

Calls 1

pqsignalFunction · 0.50

Tested by

no test coverage detected