From 5d2fbdfc9e3e097b8bd1a185000cd8c53d514aa3 Mon Sep 17 00:00:00 2001 From: Claudio Matsuoka Date: Thu, 25 Apr 2013 16:14:02 -0300 Subject: [PATCH] Fix background process status in Unix Change the way background process detection is handled in systems without signals or termios. Signed-off-by: Claudio Matsuoka --- src/main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index b2c5335..e2c0472 100644 --- a/src/main.c +++ b/src/main.c @@ -28,7 +28,7 @@ extern int optind; static struct sound_driver *sound; -static unsigned int foreground_in = 1, foreground_out = 1; +static unsigned int foreground_in, foreground_out; static int refresh_status; @@ -87,6 +87,8 @@ static void sigcont_handler(int sig) /* Only call if it was not already prepared */ set_tty(); } +#else + foreground_in = foregound_out = 1; #endif if (sig != 0) @@ -439,6 +441,8 @@ int main(int argc, char **argv) #ifdef SIGTSTP sigcont_handler(0); +#else + foreground_in = foregound_out = 1; #endif if (foreground_out && opt.verbose > 0) { info_frame(&mi, &fi, &control, refresh_status);