Hello, Daniel P. Berrangé, le mer. 14 nov. 2018 14:22:34 +0000, a ecrit: > On Wed, Nov 14, 2018 at 04:36:05PM +0400, Marc-André Lureau wrote: > > Use g_spawn_async_with_fds() to setup the child. > > > > GSpawn handles reaping the child, and closing parent file descriptors. > > The g_spawn* family of APIs is portable to Win32, which the current > fork/exec code in slirp is not. > > So I'm curious if this conversion is sufficient to make this part > of slirp work on Win32, or if further portability problems remain. > If it does work on Win32, then you can also delete the stub > fork_exec() impl the code currently has.
Mmm, I don't think any portability issue remains. SO_OOBINLINE is used in other places, the rest is portable. There is the setsid() call which may just not make sense on Windows, but we could just disable it there. I have pushed to https://people.debian.org/~sthibault/qemu.git slirp-2-win what it could look like. I don't have a windows box off hand, could somebody try it to confirm that it builds? Samuel