mirror of
https://github.com/rkd77/elinks.git
synced 2025-01-03 14:57:44 -05:00
[fg] master_pid is 0 for slave terminals, so no need to comapare with pid
(cherry picked from commit 432771ac82
)
This commit is contained in:
parent
66e17a6a07
commit
0b704887db
@ -77,7 +77,7 @@ sig_tstp(struct terminal *term)
|
|||||||
|
|
||||||
block_itrm();
|
block_itrm();
|
||||||
#if defined (SIGCONT) && defined(SIGTTOU)
|
#if defined (SIGCONT) && defined(SIGTTOU)
|
||||||
if (pid == master_pid) {
|
if (master_pid) {
|
||||||
pid_t newpid = fork();
|
pid_t newpid = fork();
|
||||||
if (!newpid) {
|
if (!newpid) {
|
||||||
sleep(1);
|
sleep(1);
|
||||||
|
@ -190,9 +190,11 @@ init_term(int fdin, int fdout)
|
|||||||
term->fdout = fdout;
|
term->fdout = fdout;
|
||||||
term->master = (term->fdout == get_output_handle());
|
term->master = (term->fdout == get_output_handle());
|
||||||
|
|
||||||
|
#ifdef HAVE_GETPID
|
||||||
if (term->master) {
|
if (term->master) {
|
||||||
master_pid = getpid();
|
master_pid = getpid();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
term->blocked = -1;
|
term->blocked = -1;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user