skip_console_setting:
restore_reattach_pcon ();
if (get_ttyp ()->pcon_pid == 0 ||
- kill (get_ttyp ()->pcon_pid, 0) != 0)
+ !pinfo (get_ttyp ()->pcon_pid))
get_ttyp ()->pcon_pid = myself->pid;
get_ttyp ()->switch_to_pcon_in = true;
}
{
wait_pcon_fwd ();
if (get_ttyp ()->pcon_pid == 0 ||
- kill (get_ttyp ()->pcon_pid, 0) != 0)
+ !pinfo (get_ttyp ()->pcon_pid))
get_ttyp ()->pcon_pid = myself->pid;
get_ttyp ()->switch_to_pcon_out = true;
}
this->set_switch_to_pcon (fd);
if (get_ttyp ()->pcon_pid &&
get_ttyp ()->pcon_pid != myself->pid &&
- kill (get_ttyp ()->pcon_pid, 0) == 0)
+ !!pinfo (get_ttyp ()->pcon_pid))
/* There is a process which is grabbing pseudo console. */
return;
if (isHybrid)
ENABLE_PROCESSED_INPUT | ENABLE_LINE_INPUT | ENABLE_ECHO_INPUT;
SetConsoleMode (get_handle (), mode);
if (get_ttyp ()->pcon_pid == 0 ||
- kill (get_ttyp ()->pcon_pid, 0) != 0)
+ !pinfo (get_ttyp ()->pcon_pid))
get_ttyp ()->pcon_pid = myself->pid;
get_ttyp ()->switch_to_pcon_in = true;
}
if (!get_ttyp ()->switch_to_pcon_out)
wait_pcon_fwd ();
if (get_ttyp ()->pcon_pid == 0 ||
- kill (get_ttyp ()->pcon_pid, 0) != 0)
+ !pinfo (get_ttyp ()->pcon_pid))
get_ttyp ()->pcon_pid = myself->pid;
get_ttyp ()->switch_to_pcon_out = true;