From 376c6e8df45c00d8cc69cb1f4f43a0c2151c5a3a Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Sat, 12 Feb 2000 13:41:48 +0000 Subject: zsh-workers/9692 --- Src/init.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Src/init.c') diff --git a/Src/init.c b/Src/init.c index 0dc063f7b..08fd2a4c4 100644 --- a/Src/init.c +++ b/Src/init.c @@ -399,10 +399,8 @@ init_io(void) #ifdef JOB_CONTROL /* If interactive, make the shell the foreground process */ if (opts[MONITOR] && interact && (SHTTY != -1)) { - attachtty(GETPGRP()); if ((mypgrp = GETPGRP()) > 0) { while ((ttpgrp = gettygrp()) != -1 && ttpgrp != mypgrp) { - sleep(1); mypgrp = GETPGRP(); if (mypgrp == gettygrp()) break; @@ -413,6 +411,7 @@ init_io(void) opts[MONITOR] = 0; } else opts[MONITOR] = 0; + attachtty(GETPGRP()); #else opts[MONITOR] = 0; #endif -- cgit 1.4.1