diff --git a/src/osdep/signals.c b/src/osdep/signals.c index 8bb0d0c3d..d7dce0a63 100644 --- a/src/osdep/signals.c +++ b/src/osdep/signals.c @@ -77,7 +77,7 @@ sig_tstp(struct terminal *term) block_itrm(); #if defined (SIGCONT) && defined(SIGTTOU) - if (pid == master_pid) { + if (master_pid) { pid_t newpid = fork(); if (!newpid) { sleep(1); diff --git a/src/terminal/terminal.c b/src/terminal/terminal.c index ee5169463..29047cbe1 100644 --- a/src/terminal/terminal.c +++ b/src/terminal/terminal.c @@ -190,9 +190,11 @@ init_term(int fdin, int fdout) term->fdout = fdout; term->master = (term->fdout == get_output_handle()); +#ifdef HAVE_GETPID if (term->master) { master_pid = getpid(); } +#endif term->blocked = -1;