mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-05 21:50:21 +08:00
* ser-pipe.c (pipe_open): Ignore SIGINTs in child.
This commit is contained in:
@ -99,6 +99,15 @@ pipe_open (struct serial *scb, const char *name)
|
||||
/* Child. */
|
||||
if (pid == 0)
|
||||
{
|
||||
/* We don't want ^c to kill the connection. */
|
||||
#ifdef HAVE_SETSID
|
||||
pid_t sid = setsid ();
|
||||
if (sid == -1)
|
||||
signal (SIGINT, SIG_IGN);
|
||||
#else
|
||||
signal (SIGINT, SIG_IGN);
|
||||
#endif
|
||||
|
||||
/* re-wire pdes[1] to stdin/stdout */
|
||||
close (pdes[0]);
|
||||
if (pdes[1] != STDOUT_FILENO)
|
||||
|
Reference in New Issue
Block a user