aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKalle Wallin <kaw@linux.se>2004-07-12 20:21:15 +0000
committerKalle Wallin <kaw@linux.se>2004-07-12 20:21:15 +0000
commit0884f031a5487e0976dac558bf8ab5b21295b2d8 (patch)
tree22e5b9465e5ad1d5a57e36d5aed9992470f19d78 /src
parenta3d7f579b321e8476599fd246f67b56aaba5400b (diff)
downloadmpd-0884f031a5487e0976dac558bf8ab5b21295b2d8.tar.gz
mpd-0884f031a5487e0976dac558bf8ab5b21295b2d8.tar.xz
mpd-0884f031a5487e0976dac558bf8ab5b21295b2d8.zip
Added SIGCONT handler
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1856 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/main.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index abe60bf15..9497e3b61 100644
--- a/src/main.c
+++ b/src/main.c
@@ -133,6 +133,13 @@ catch_sigint( int sig )
exit(EXIT_SUCCESS);
}
+void
+catch_sigcont( int sig )
+{
+ D("catch_sigcont()\n");
+ screen_resize();
+}
+
#ifdef DEBUG
void
D(char *format, ...)
@@ -196,7 +203,7 @@ main(int argc, const char *argv[])
sigemptyset( &act.sa_mask );
act.sa_flags = 0;
act.sa_handler = catch_sigint;
- if( sigaction( SIGINT, &act, NULL )<0 )
+ if( sigaction(SIGINT, &act, NULL)<0 )
{
perror("signal");
exit(EXIT_FAILURE);
@@ -205,11 +212,20 @@ main(int argc, const char *argv[])
sigemptyset( &act.sa_mask );
act.sa_flags = 0;
act.sa_handler = catch_sigint;
- if( sigaction( SIGTERM, &act, NULL )<0 )
+ if( sigaction(SIGTERM, &act, NULL)<0 )
{
perror("sigaction()");
exit(EXIT_FAILURE);
}
+ /* setup signal behavior - SIGCONT */
+ sigemptyset( &act.sa_mask );
+ act.sa_flags = 0;
+ act.sa_handler = catch_sigcont;
+ if( sigaction(SIGCONT, &act, NULL)<0 )
+ {
+ perror("sigaction(SIGCONT)");
+ exit(EXIT_FAILURE);
+ }
/* install exit function */
atexit(exit_and_cleanup);