summaryrefslogtreecommitdiff
path: root/gdb/ser-pipe.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/ser-pipe.c')
-rw-r--r--gdb/ser-pipe.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/ser-pipe.c b/gdb/ser-pipe.c
index a510bff8da3..fd073c2e0a5 100644
--- a/gdb/ser-pipe.c
+++ b/gdb/ser-pipe.c
@@ -64,7 +64,11 @@ pipe_open (serial_t scb, const char *name)
if (socketpair (AF_UNIX, SOCK_STREAM, 0, pdes) < 0)
return -1;
+#ifdef HAVE_VFORK
pid = vfork ();
+#else
+ pid = fork ();
+#endif
/* Error. */
if (pid == -1)