TutErrNumGetOs


Name

TutErrNumGetOs — get the value of the operating system error number

Synopsis

T_INT4 TutErrNumGetOs() 

Arguments

None

Return Values

The value of the operating system error number.

Diagnostics

None

Description

The operating system error number is a value indicating how the last OS function failed. The error number is valid only when TutErrNumGet reports T_ERR_OS.

On OpenVMS, if the error also has a C equivalent, call the function TutErrNumGetC to obtain the related C-specific error value (TutErrNumGetC returns 0 if there is no equivalent C error).

This error number is stored in a value for each thread to accommodate multi-threaded programs.

Caution

TutErrNumGetOs should only be called when TutErrNumGet returns T_ERR_OS.

See Also

TutErrNumGet, TutErrNumGetC, TutErrNumGetSocket

Examples

This example checks if an OS error occurred and prints the related OS error code:

if (TutErrNumGet() == T_ERR_OS) { 
  TutOut("OS error %d occurred.\n", TutErrNumGetOs()); 
} 

TIBCO SmartSockets™ Utilities
Software Release 6.8, July 2006
Copyright © TIBCO Software Inc. All rights reserved
www.tibco.com