libc-wasi: Make rights of STDIN/STDOUT/STDERR fixed and overlook their access modes (#3694)
When determining the file descriptor rights in the function fd_determine_type_rights(), we assign fixed and unchangeable rights to STDIN, STDOUT and STDERR. ps. https://github.com/bytecodealliance/wasm-micro-runtime/issues/3686
This commit is contained in:
@ -1502,6 +1502,33 @@ os_convert_stdout_handle(os_raw_file_handle raw_stdout);
|
||||
os_file_handle
|
||||
os_convert_stderr_handle(os_raw_file_handle raw_stderr);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param fd a file handle
|
||||
*
|
||||
* @return true if it is stdin
|
||||
*/
|
||||
bool
|
||||
os_is_stdin_handle(os_file_handle fd);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param fd a file handle
|
||||
*
|
||||
* @return true if it is stdout
|
||||
*/
|
||||
bool
|
||||
os_is_stdout_handle(os_file_handle fd);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param fd a file handle
|
||||
*
|
||||
* @return true if it is stderr
|
||||
*/
|
||||
bool
|
||||
os_is_stderr_handle(os_file_handle fd);
|
||||
|
||||
/**
|
||||
* Open a directory stream for the provided directory handle. The returned
|
||||
* directory stream will be positioned at the first entry in the directory.
|
||||
|
||||
Reference in New Issue
Block a user