@ConorO'Brien I'm rewriting the backend and I have an issue with DScript. Since it prints its output in a subprocess, my new script manages to close the file descriptor before the subprocess has time to print it. Took me a while to figure out why there was no output at all...
On Linux (and Windows too, I think), you can use wait() to avoid exiting before your child process does. That will still hide the generated executable's exit code though.
On Linux, you can use execv(outFileName, [outFileName]); to avoid creating a subprocess.
@Dennis I'll look into the matter. would wrapping the program into a bash program help? e.g. (using pseudocode) dscript -c file -o output && rdmd output