aboutsummaryrefslogtreecommitdiff
path: root/slirp/misc.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-09-05 23:10:26 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-09-05 23:10:26 +0000
commita3d4af03bbedccb5c777562284c1098b9df7fe8a (patch)
treeeaf07db68fad7e736183179cb049962e98e2d619 /slirp/misc.c
parent9d728e8c4ed000b1d6a77230d11b3761a7c8b5a1 (diff)
downloadqemu-a3d4af03bbedccb5c777562284c1098b9df7fe8a.zip
qemu-a3d4af03bbedccb5c777562284c1098b9df7fe8a.tar.gz
qemu-a3d4af03bbedccb5c777562284c1098b9df7fe8a.tar.bz2
allow inetd like program exec
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1060 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'slirp/misc.c')
-rw-r--r--slirp/misc.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/slirp/misc.c b/slirp/misc.c
index 64bd9ee..26f8eb5 100644
--- a/slirp/misc.c
+++ b/slirp/misc.c
@@ -212,7 +212,20 @@ strerror(error)
#endif
-#if 0
+#ifdef _WIN32
+
+int
+fork_exec(so, ex, do_pty)
+ struct socket *so;
+ char *ex;
+ int do_pty;
+{
+ /* not implemented */
+ return 0;
+}
+
+#else
+
int
openpty(amaster, aslave)
int *amaster, *aslave;
@@ -301,7 +314,9 @@ fork_exec(so, ex, do_pty)
int opt;
int master;
char *argv[256];
+#if 0
char buff[256];
+#endif
/* don't want to clobber the original */
char *bptr;
char *curarg;
@@ -360,6 +375,7 @@ fork_exec(so, ex, do_pty)
connect(s, (struct sockaddr *)&addr, addrlen);
}
+#if 0
if (x_port >= 0) {
#ifdef HAVE_SETENV
sprintf(buff, "%s:%d.%d", inet_ntoa(our_addr), x_port, x_screen);
@@ -369,7 +385,7 @@ fork_exec(so, ex, do_pty)
putenv(buff);
#endif
}
-
+#endif
dup2(s, 0);
dup2(s, 1);
dup2(s, 2);