mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
Close sigwinch_pipe at shutdown.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
b5dae72e1e
commit
9a57984974
@ -84,6 +84,7 @@ tty_create_winch_pipe (void)
|
||||
fprintf (stderr, _("\nCannot configure write end of SIGWINCH pipe: %s (%d)\n"),
|
||||
mcerror->message, mcerror->code);
|
||||
g_error_free (mcerror);
|
||||
tty_destroy_winch_pipe ();
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
@ -92,8 +93,18 @@ tty_create_winch_pipe (void)
|
||||
fprintf (stderr, _("\nCannot configure read end of SIGWINCH pipe: %s (%d)\n"),
|
||||
mcerror->message, mcerror->code);
|
||||
g_error_free (mcerror);
|
||||
tty_destroy_winch_pipe ();
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
||||
void
|
||||
tty_destroy_winch_pipe (void)
|
||||
{
|
||||
(void) close (sigwinch_pipe[0]);
|
||||
(void) close (sigwinch_pipe[1]);
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -36,6 +36,7 @@ extern int sigwinch_pipe[2];
|
||||
/*** declarations of public functions ************************************************************/
|
||||
|
||||
void tty_create_winch_pipe (void);
|
||||
void tty_destroy_winch_pipe (void);
|
||||
|
||||
char *mc_tty_normalize_from_utf8 (const char *);
|
||||
void tty_init_xterm_support (gboolean is_xterm);
|
||||
|
@ -230,6 +230,7 @@ tty_init (gboolean mouse_enable, gboolean is_xterm)
|
||||
void
|
||||
tty_shutdown (void)
|
||||
{
|
||||
tty_destroy_winch_pipe ();
|
||||
tty_reset_shell_mode ();
|
||||
tty_noraw_mode ();
|
||||
tty_keypad (FALSE);
|
||||
|
@ -343,6 +343,7 @@ tty_shutdown (void)
|
||||
{
|
||||
char *op_cap;
|
||||
|
||||
tty_destroy_winch_pipe ();
|
||||
tty_reset_shell_mode ();
|
||||
tty_noraw_mode ();
|
||||
tty_keypad (FALSE);
|
||||
|
Loading…
Reference in New Issue
Block a user