Thank you. Unfortunately, under Windows, even in your example, after the server shutdown with AServer.StopServer, the application hangs...
I'm going to offer a method which I know how to do with pure Windows API but have no idea whatsoever how it's done with the LCL.
A very simple way to implement what you've described is for the parent process to create two named mapped files. In one of the mapped files, the parent process writes information that is read by the child process. The other mapped file is where the child process writes information meant for the parent process to read. The nice thing about this method is that there is no need for threads to block or wait for events/mutexes/etc because each mapped file has only one writer and one reader.
Synchronization is implemented simply by having a counter (usually at the beginning of the mapped file) which is read by the reader and incremented by the writer. If the counter has been incremented since the last time it was read then there is new information, if the counter hasn't changed, the process can do something else before checking the counter again later.
A fancier implementation has 2 separate threads (one in each process) checking the counters and, if there is no change, go to sleep for a few milliseconds before checking again (or do some other work).
Depending on exactly what your processes do, there is probably a variation of this method that can be fitted to the needs of your program. Another plus of this method is that the parent and child process can write a message to their mapped file letting the other know that it is alive and when it is ending/terminating along with its exit code. This is basically a "ping" whereby each process writes a message every tenth of second (if it doesn't have information to post) letting the other know it is alive. That saves you from having to write code to find out if either process is dead/hung/terminated/mummified/embalmed/etc.
I hope that may be helpful to you. If I knew how to do that using the LCL, I'd gladly offer some code but, you don't want LCL code from me (at least not at this time.)