Mountain Lion

Peter Korsten peter at severity-one.com
Sun Feb 19 13:58:21 CET 2012


Hi Martin,

> The paragraph above pretty much sums it up. Fork is an old concept from
> the days before multi-threading became the norm, and since multi-tasking
> is a bit younger in the Windows world compared to Unix, fork was never
> been considered necessary... CreateThread and CreateProcess are your
> friends - and then there are of course countless libs to wrap those two
> nicely.

But in my scenario, where a process detaches itself from the terminal it 
was started from, is it possible to do something similar with Windows? 
The impression I get is that you need to add certain flags to the 
CreateProcess call, but that would make the solution actually more 
complex that the Unix one.

Just to remind the original point: I'm using JNA (Java Native Access) to 
call native library functions. With JNA, it's a pure Java solution, so 
you don't need to have any machine-dependent C code. There are methods 
to check whether you're on Windows or Unix, so it is possible to write 
code that will run everywhere.

- Peter


More information about the music-bar mailing list