initialize WASI stdio handles to invalid for better error handling (#4092)
* initialize WASI stdio handles to invalid for better error handling * implement os_invalid_raw_handle function for consistent invalid handle representation
This commit is contained in:
@ -1607,6 +1607,15 @@ os_is_dir_stream_valid(os_dir_stream *dir_stream);
|
||||
os_file_handle
|
||||
os_get_invalid_handle(void);
|
||||
|
||||
/**
|
||||
* Returns an invalid raw file handle that is guaranteed to cause failure when
|
||||
* called with any filesystem operation.
|
||||
*
|
||||
* @return the invalid raw file handle
|
||||
*/
|
||||
os_raw_file_handle
|
||||
os_invalid_raw_handle(void);
|
||||
|
||||
/**
|
||||
* Checks whether the given file handle is valid. An invalid handle is
|
||||
* guaranteed to cause failure when called with any filesystem operation.
|
||||
|
||||
Reference in New Issue
Block a user