public static int getfd ( FileDescriptor descriptor ) { Field field = FBUtilities . getProtectedField ( descriptor . getClass ( ) , "fd" ) ; if ( field == null ) return - 1 ; try { return field . getInt ( descriptor ) ; } catch ( Exception e ) { JVMStabilityInspector . inspectThrowable ( e ) ; logger . warn ( "unable to read fd field from FileDescriptor" ) ; } return - 1 ; }
Get system file descriptor from FileDescriptor object .