From a3d4af03bbedccb5c777562284c1098b9df7fe8a Mon Sep 17 00:00:00 2001 From: bellard Date: Sun, 5 Sep 2004 23:10:26 +0000 Subject: allow inetd like program exec git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1060 c046a42c-6fe2-441c-8c8c-71466251a162 --- slirp/misc.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'slirp/misc.c') diff --git a/slirp/misc.c b/slirp/misc.c index 64bd9ee2f5..26f8eb578d 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); -- cgit v1.2.3