xrdp_chansrv_%8.8x_main_term and xrdp_chansrv_%8.8x_thread_done are both
wait objects, not sockets. They are created and cleaned up in chansrv.c
Wait objects are pairs of file descriptors on POSIX. They are closed
automatically when the process exits.
On Windows, wait objects are handles that are closed by CloseHandle().
Those handles should also be closed on the process exit.
In any case, there is no way for a parent process to clean up file
handles of the child process.
AM_CPPFLAGS is for flags passed to the preprocessor, such as defines and
includes. AM_CFLAGS is for flags affecting the compiler, such as debug
and optimization settings.
INCLUDES is an obsolete name. Users can pass INCLUDES and break
compilation. AM_CPPFLAGS is more explicit that the flags come from
Automake and should not be overridden.