Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#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


"+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:

  1. Find a unused port.
  2. Start a server in background listening on that port (--tcp --port $PORT --bind localhost)[0]
  3. Set future address of server in server_name.
  4. Wait for server to start up.
  5. Connect to server_name.
  6. Use the connection.
  7. 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:

  1. Fork and start the server using --no-listen and --client-fh.
  2. Use the connection as with other server types.



Change History (3)

comment:1 Changed 11 years ago by ph3-der-loewe

  • Cc stephanj added
  • Owner set to ph3-der-loewe
  • Status changed from new to accepted

I'm working on this.

comment:2 Changed 11 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 11 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.

Note: See TracTickets for help on using tickets.