Skip to content
  • Simon McVittie's avatar
    sysdeps test: Wait for spawned process to exit · 7db89148
    Simon McVittie authored and Ralf Habacker's avatar Ralf Habacker committed
    
    
    On Windows, the "out" parameter for the process handle isn't set
    unless we specify G_SPAWN_FLAGS_DO_NOT_REAP_CHILD. That means we
    can't terminate it, and the child process is leaked. When running the
    test individually, the leaked process is harmless apart from its
    resource cost, but when running under CTest, it holds a file descriptor
    open (or something) which causes CTest to not exit.
    
    If we *do* specify G_SPAWN_FLAGS_DO_NOT_REAP_CHILD, we become
    responsible for "reaping" the child process by waiting for its exit
    status, which is an OS-specific action.
    
    Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
    Resolves: #238
    7db89148