src/aix/native/java/net/aix_close.c

Print this page

        

*** 36,45 **** --- 36,57 ---- * Side Note: This coding needs initialization. Under Linux this is done * automatically via __attribute((constructor)), on AIX this is done manually * (see aix_close_init). * */ + + /* + AIX needs a workaround for I/O cancellation, see: + http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic=/com.ibm.aix.basetechref/doc/basetrf1/close.htm + ... + The close subroutine is blocked until all subroutines which use the file + descriptor return to usr space. For example, when a thread is calling close + and another thread is calling select with the same file descriptor, the + close subroutine does not return until the select call returns. + ... + */ + #include <stdio.h> #include <stdlib.h> #include <signal.h> #include <pthread.h> #include <sys/types.h>