* interactive_getc -- collect one character from stdin * * Even though we are not reading from a "client" process, we still want to * respond to signals, particularly SIGTERM/SIGQUIT. */
| 418 | * respond to signals, particularly SIGTERM/SIGQUIT. |
| 419 | */ |
| 420 | static int |
| 421 | interactive_getc(void) |
| 422 | { |
| 423 | int c; |
| 424 | |
| 425 | /* |
| 426 | * This will not process catchup interrupts or notifications while |
| 427 | * reading. But those can't really be relevant for a standalone backend |
| 428 | * anyway. To properly handle SIGTERM there's a hack in die() that |
| 429 | * directly processes interrupts at this stage... |
| 430 | */ |
| 431 | CHECK_FOR_INTERRUPTS(); |
| 432 | |
| 433 | enable_client_wait_timeout_interrupt(); |
| 434 | |
| 435 | c = getc(stdin); |
| 436 | |
| 437 | disable_client_wait_timeout_interrupt(); |
| 438 | |
| 439 | ProcessClientReadInterrupt(false); |
| 440 | |
| 441 | return c; |
| 442 | } |
| 443 | |
| 444 | /* ---------------- |
| 445 | * SocketBackend() Is called for frontend-backend connections |
no test coverage detected