in reply to Re^2: What's the best way to find an unused TCP port on the local system
in thread What's the best way to find an unused TCP port on the local system

No, it's not possible. Such a feature would unavoidably introduce a race condition. Your child process needs to either communicate the port back to you, or must inherit the opened socket from you.
  • Comment on Re^3: What's the best way to find an unused TCP port on the local system