Skip to content

Commit a35debd

Browse files
committed
Fix some review comments
1 parent 60dcb49 commit a35debd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

rfcs/0050-vm-syscalls-3/0050-vm-syscalls-3.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ This document describes the addition of the syscalls during the CKB2023. This up
1414

1515
## Introduction
1616

17-
The design of the syscall `spawn` function draws inspiration from Unix and Linux, hence they share the same terminologies: process, pipe, and file descriptor. The `spawn` is a mechanism used in `ckb-vm` to create new processes, which can then execute a different program or command independently of the parent process.
17+
The design of the syscall spawn function draws inspiration from Unix and Linux, hence they share the same terminologies: process, pipe, and file descriptor. The spawn mechanism is used in ckb-vm to create new processes, which can then execute a different program or command independently of the parent process.
1818

19-
In the context of `ckb-vm`, a process represents the active execution of a RISC-V binary. This binary can be located within a cell. Additionally, a RISC-V binary can also be found within the witness during a syscall `spawn` . A pipe is established by associating two file descriptors, each linked to one of its ends. These file descriptors cannot be duplicated and are exclusively owned by the process. Furthermore, the file descriptors can only be either read from or written to; they cannot be both read from and written to simultaneously.
19+
In the context of ckb-vm, a process represents the active execution of a RISC-V binary. This binary can be located within a cell. Additionally, a RISC-V binary can also be found within the witness during a syscall spawn. A pipe is established by associating two file descriptors, each linked to one of its ends. These file descriptors can't be duplicated and are exclusively owned by the process. Furthermore, the file descriptors can only be either read from or written to; they can't be both read from and written to simultaneously.
2020

2121
We added 8 spawn-related syscalls and one block-related syscall, respectively:
2222

@@ -68,7 +68,7 @@ The arguments used here are:
6868
- process_id: a pointer used to save the process_id of the child process
6969
- inherited_fds: an array representing the file descriptors passed to the child process. It must end with zero.
7070
71-
The arguments used here index, source, bounds, place, argc and argv follow the usage described in [EXEC].
71+
The arguments used here - index, source, bounds, place, argc, and argv - follow the usage described in [EXEC].
7272
7373
### Pipe
7474
[Pipe]: #pipe
@@ -126,7 +126,7 @@ It's not always necessary to manually close file descriptors. When a process is
126126
### Wait
127127
[Wait]: #wait
128128

129-
The syscall pauses until the execution of a process specified by `pid` has ended.
129+
The syscall pauses until the execution of a process specified by `pid` has ended. If the process has already terminated when Wait is called, the method returns immediately.
130130

131131
```c
132132
int ckb_wait(uint64_t pid, int8_t* exit_code);

0 commit comments

Comments
 (0)