28 static int terminal_fd;
31 static pid_t old_foreground_pgrp;
36 restore_old_foreground_pgrp (
void)
38 tcsetpgrp (terminal_fd, old_foreground_pgrp);
54 signal (SIGTTOU, SIG_DFL);
55 signal (SIGTTIN, SIG_DFL);
78 static int debug_setpgrp = 657473;
81 if (debug_setpgrp == -1)
82 perror (
_(
"setpgrp failed in child"));
100 signal (SIGTTOU, SIG_IGN);
101 signal (SIGTTIN, SIG_IGN);
102 terminal_fd = fileno (stderr);
103 old_foreground_pgrp = tcgetpgrp (terminal_fd);
104 tcsetpgrp (terminal_fd, pid);
105 atexit (restore_old_foreground_pgrp);
114 fprintf (stderr,
"Process %s created; pid = %d\n", program, pid);
ptid_t startup_inferior(pid_t pid, int ntraps, struct target_waitstatus *last_waitstatus, ptid_t *last_ptid)
struct thread_info * current_thread
void prefork_hook(const char *args)
void perror(const char *)
#define target_post_create_inferior()
enum resume_kind last_resume_kind
void post_fork_inferior(int pid, const char *program)
struct target_waitstatus last_status
void postfork_hook(pid_t pid)
struct target_waitstatus last_status
#define START_INFERIOR_TRAPS_EXPECTED
void debug_printf(const char *fmt,...)
void postfork_child_hook()