MiniDevil
As beautiful as a shell
Heredoc signal handling: SIGINT handler for heredoc input. More...
Include dependency graph for heredoc_signals.c:Heredoc signal handling: SIGINT handler for heredoc input.
Definition in file heredoc_signals.c.
Functions | |
| void | heredoc_sigint_handler (int sig) |
| SIGINT handler for heredoc. More... | |
| void | setup_heredoc_signals (void) |
| Configure signals for heredoc. More... | |
| void | restore_stdin (void) |
| Restore STDIN after heredoc SIGINT closed it. More... | |
| void heredoc_sigint_handler | ( | int | sig | ) |
SIGINT handler for heredoc.
Closes STDIN to force readline/gnl to return NULL, thus breaking the heredoc read loop
| sig | Signal number (SIGINT) |
Definition at line 26 of file heredoc_signals.c.
References g_signal.
Referenced by setup_heredoc_signals().
Here is the caller graph for this function:| void setup_heredoc_signals | ( | void | ) |
Configure signals for heredoc.
Definition at line 40 of file heredoc_signals.c.
References heredoc_sigint_handler().
Referenced by handle_heredoc().
Here is the call graph for this function:
Here is the caller graph for this function:| void restore_stdin | ( | void | ) |
Restore STDIN after heredoc SIGINT closed it.
Reopens /dev/tty and uses dup2 to reassign it to fd 0 (STDIN)
Definition at line 62 of file heredoc_signals.c.
Referenced by handle_heredoc().
Here is the caller graph for this function: