#337 closed enhancement (fixed)
+fork support for win32
Reported by: | ph3-der-loewe | Owned by: | ph3-der-loewe |
---|---|---|---|
Priority: | medium | Milestone: | RoarAudio major release 1.0 |
Component: | libroar and friends | Version: | 1.0beta9 |
Keywords: | Cc: | stephanj | |
Architecture: | i386 | Compiler: | |
Difficulty: | hard | Kernel: | other |
Operating System: | Windows | Parent Tickets: | |
Patch attached: | no | Protocol: | RoarAudio |
Sound driver: | virtual | Topic: | Porting |
Description
"+fork" support works by using two key features of a modern OS: fork and Unix Sockets. Both is not available on win32. A workaround to this should be created. Here is how the workaround could work:
- Find a unused port.
- Start a server in background listening on that port (--tcp --port $PORT --bind localhost)[0]
- Set future address of server in server_name.
- Wait for server to start up.
- Connect to server_name.
- Use the connection.
- Send TERMINATE on disconnect (only starting connection) before QUIT.
Not that every step is subject to multiple race condition which are out of our control on win32.
Just for the understanding here is how the normal "+fork" mode works:
- Fork and start the server using --no-listen and --client-fh.
- Use the connection as with other server types.
Subtickets
Change History (3)
comment:1 Changed 10 years ago by ph3-der-loewe
- Cc stephanj added
- Owner set to ph3-der-loewe
- Status changed from new to accepted
comment:2 Changed 10 years ago by ph3-der-loewe
- Resolution set to fixed
- Status changed from accepted to closed
- Version changed from current to 1.0beta9
Tested with wine. Can start a linux binary.
Does currently not check if exec() worked. This should be fixed.
comment:3 Changed 10 years ago by ph3-der-loewe
just commited fixes for the error checking and passing. Beside using system type (+fork=!) locations doesn't work. Only daemonimage type (+fork=d:) locations are supported.
I'm working on this.