mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
Clarify usage of SA_RESTART.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
c26c3cc4fd
commit
6a05f30ecf
@ -92,11 +92,13 @@ tty_setup_sigwinch (void (*handler) (int))
|
|||||||
{
|
{
|
||||||
#if (NCURSES_VERSION_MAJOR >= 4) && defined (SIGWINCH)
|
#if (NCURSES_VERSION_MAJOR >= 4) && defined (SIGWINCH)
|
||||||
struct sigaction act, oact;
|
struct sigaction act, oact;
|
||||||
|
|
||||||
act.sa_handler = handler;
|
act.sa_handler = handler;
|
||||||
sigemptyset (&act.sa_mask);
|
sigemptyset (&act.sa_mask);
|
||||||
act.sa_flags = 0;
|
|
||||||
#ifdef SA_RESTART
|
#ifdef SA_RESTART
|
||||||
act.sa_flags |= SA_RESTART;
|
act.sa_flags = SA_RESTART;
|
||||||
|
#else
|
||||||
|
act.sa_flags = 0;
|
||||||
#endif /* SA_RESTART */
|
#endif /* SA_RESTART */
|
||||||
sigaction (SIGWINCH, &act, &oact);
|
sigaction (SIGWINCH, &act, &oact);
|
||||||
#endif /* SIGWINCH */
|
#endif /* SIGWINCH */
|
||||||
|
@ -61,10 +61,6 @@ extern int reset_hp_softkeys;
|
|||||||
|
|
||||||
/*** file scope macro definitions ****************************************************************/
|
/*** file scope macro definitions ****************************************************************/
|
||||||
|
|
||||||
#ifndef SA_RESTART
|
|
||||||
#define SA_RESTART 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef SLTT_MAX_SCREEN_COLS
|
#ifndef SLTT_MAX_SCREEN_COLS
|
||||||
#define SLTT_MAX_SCREEN_COLS 512
|
#define SLTT_MAX_SCREEN_COLS 512
|
||||||
#endif
|
#endif
|
||||||
|
@ -120,7 +120,11 @@ tty_start_interrupt_key (void)
|
|||||||
|
|
||||||
act.sa_handler = sigintr_handler;
|
act.sa_handler = sigintr_handler;
|
||||||
sigemptyset (&act.sa_mask);
|
sigemptyset (&act.sa_mask);
|
||||||
|
#ifdef SA_RESTART
|
||||||
act.sa_flags = SA_RESTART;
|
act.sa_flags = SA_RESTART;
|
||||||
|
#else
|
||||||
|
act.sa_flags = 0;
|
||||||
|
#endif /* SA_RESTART */
|
||||||
sigaction (SIGINT, &act, NULL);
|
sigaction (SIGINT, &act, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user