Skip to content

Commit

Permalink
Optimize ckb_close
Browse files Browse the repository at this point in the history
  • Loading branch information
mohanson committed May 6, 2024
1 parent 4854c71 commit 620e744
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rfcs/0050-vm-syscalls-3/0050-vm-syscalls-3.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ When using `ckb_read` and `ckb_write`, there may be the following scenarios:
### Close
[Close]: #close
This syscall manually closes a file descriptor. After calling this, any attempt to read/write the file descriptor pointed to the other end would fail. After using close, there are four typical situations:
This syscall manually closes a file descriptor. After calling this, any attempt to read/write the file descriptor pointed to the other end would fail, so closing a single file descriptor, essentially closes the entire pair of pipes. After using close, there are four typical situations:
- close writer, and then try to write data to writer through `ckb_write`. In this case `ckb_write` will fail and return error(6).
- close writer, and then try to read data from reader through `ckb_read`. In this case if there is unread data in Pipe, ckb_read will execute normally; otherwise, it will return error(7).
Expand Down

0 comments on commit 620e744

Please sign in to comment.