signal (SIGRTMIN + 1, SIG_DFL);
+ setpgid (0, 0);
+
execv (program, allargs);
fprintf (stderr, "Cannot exec %s: %s.\n", program,
new_process = add_process (pid);
add_thread (pid, new_process);
- return 0;
+ return pid;
}
/* Attach to an inferior process. */
error ("Invalid register number %d.", regnum);
addr = the_low_target.regmap[regnum];
- if (addr == -1)
- addr = 0;
return addr;
}
#endif
}
-/* Return 1 if this process is not stopped. */
-static int
-unstopped_p (struct inferior_list_entry *entry, void *dummy)
-{
- struct process_info *process = (struct process_info *) entry;
-
- if (process->stopped)
- return 0;
-
- return 1;
-}
-
-static int
-linux_signal_pid ()
-{
- struct inferior_list_entry *process;
-
- process = find_inferior (&all_processes, unstopped_p, NULL);
-
- if (process == NULL)
- {
- warning ("no unstopped process");
- return inferior_pid;
- }
-
- return pid_of ((struct process_info *) process);
-}
-
\f
static struct target_ops linux_target_ops = {
linux_create_inferior,
linux_read_memory,
linux_write_memory,
linux_look_up_symbols,
- linux_signal_pid,
};
static void