/* Called when going to wait for the target. Usually allows the GUI to run
while waiting for target events. */
-int (*target_wait_hook) (int pid, struct target_waitstatus * status);
+ptid_t (*target_wait_hook) (ptid_t ptid,
+ struct target_waitstatus * status);
/* Used by UI as a wrapper around command execution. May do various things
like enabling/disabling buttons, etc... */
int
quit_confirm (void)
{
- if (inferior_pid != 0 && target_has_execution)
+ if (! ptid_equal (inferior_ptid, null_ptid) && target_has_execution)
{
char *s;
exit_code = (int) value_as_long (val);
}
- if (inferior_pid != 0 && target_has_execution)
+ if (! ptid_equal (inferior_ptid, null_ptid) && target_has_execution)
{
if (attach_flag)
target_detach (args, from_tty);