Table of Contents

Method close

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

close(int)

Closes the file descriptor, releasing the associated system resources.

public static extern int close(int fd)

Parameters

fd int

The file descriptor to close. Must be a valid, open file descriptor.

Returns

int

Returns 0 if the file descriptor was successfully closed; otherwise, returns -1 and sets the errNo to indicate the error.

Remarks

This method is a P/Invoke declaration for the close function in the C standard library. Ensure that the file descriptor is valid and not already closed before calling this method.