1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-02 22:11:54 +02:00

zsh-workers/9694

This commit is contained in:
Tanaka Akira 2000-02-12 18:04:00 +00:00
parent c44ff62d89
commit 3fa0e7d4d3

View file

@ -401,7 +401,10 @@ init_io(void)
if (opts[MONITOR] && interact && (SHTTY != -1)) { if (opts[MONITOR] && interact && (SHTTY != -1)) {
if ((mypgrp = GETPGRP()) > 0) { if ((mypgrp = GETPGRP()) > 0) {
while ((ttpgrp = gettygrp()) != -1 && ttpgrp != mypgrp) { while ((ttpgrp = gettygrp()) != -1 && ttpgrp != mypgrp) {
sleep(1); /* give parent time to change pgrp */
mypgrp = GETPGRP(); mypgrp = GETPGRP();
if (mypgrp == mypid)
attachtty(mypgrp);
if (mypgrp == gettygrp()) if (mypgrp == gettygrp())
break; break;
killpg(mypgrp, SIGTTIN); killpg(mypgrp, SIGTTIN);
@ -411,7 +414,6 @@ init_io(void)
opts[MONITOR] = 0; opts[MONITOR] = 0;
} else } else
opts[MONITOR] = 0; opts[MONITOR] = 0;
attachtty(GETPGRP());
#else #else
opts[MONITOR] = 0; opts[MONITOR] = 0;
#endif #endif