xref: /netbsd-src/external/gpl3/gdb/dist/gdbsupport/job-control.h (revision 5ba1f45f2a09259cc846f20c7c5501604d633c90)
18dffb485Schristos /* Job control and terminal related functions, for GDB and gdbserver
28dffb485Schristos    when running under Unix.
38dffb485Schristos 
4*5ba1f45fSchristos    Copyright (C) 1986-2024 Free Software Foundation, Inc.
58dffb485Schristos 
68dffb485Schristos    This file is part of GDB.
78dffb485Schristos 
88dffb485Schristos    This program is free software; you can redistribute it and/or modify
98dffb485Schristos    it under the terms of the GNU General Public License as published by
108dffb485Schristos    the Free Software Foundation; either version 3 of the License, or
118dffb485Schristos    (at your option) any later version.
128dffb485Schristos 
138dffb485Schristos    This program is distributed in the hope that it will be useful,
148dffb485Schristos    but WITHOUT ANY WARRANTY; without even the implied warranty of
158dffb485Schristos    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
168dffb485Schristos    GNU General Public License for more details.
178dffb485Schristos 
188dffb485Schristos    You should have received a copy of the GNU General Public License
198dffb485Schristos    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
208dffb485Schristos 
218dffb485Schristos #ifndef COMMON_JOB_CONTROL_H
228dffb485Schristos #define COMMON_JOB_CONTROL_H
238dffb485Schristos 
248dffb485Schristos /* Do we have job control?  Can be assumed to always be the same
258dffb485Schristos    within a given run of GDB.  Use in gdb/inflow.c and
268dffb485Schristos    gdbsupport/common-inflow.c.  */
278dffb485Schristos extern int job_control;
288dffb485Schristos 
298dffb485Schristos /* Set the process group of the caller to its own pid, or do nothing
308dffb485Schristos    if we lack job control.  */
318dffb485Schristos extern int gdb_setpgid ();
328dffb485Schristos 
338dffb485Schristos /* Determine whether we have job control, and set variable JOB_CONTROL
348dffb485Schristos    accordingly.  This function must be called before any use of
358dffb485Schristos    JOB_CONTROL.  */
368dffb485Schristos extern void have_job_control ();
378dffb485Schristos 
388dffb485Schristos #endif /* COMMON_JOB_CONTROL_H */
39