if (resizeHandler != null) {
tty.resizehandler(null);
}
}
} else {
<BUG>if (!foreground) {

foreground = true;
</BUG>
if (stdinHandler != null) {

if (resizeHandler != null) {
tty.resizehandler(null);
}
}
} else {
if (!processForeground) {
processForeground = true;
if (stdinHandler != null) {
