-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[stdlib] Hristo/foundations for os process module #4017
base: main
Are you sure you want to change the base?
[stdlib] Hristo/foundations for os process module #4017
Conversation
- Add `read_bytes` capability to `FileDecscriptor` - Add file descriptor controls function to Libc. bindings - Adds vfork, execvp, kill system call utils. to Mojos cLib binds Signed-off-by: Hristo I. Gueorguiev <53634432+izo0x90@users.noreply.github.com>
Update `read_bytes` from Span[Byte] to List[Byte] for better memory safety and "user ergonomics" Signed-off-by: Hristo I. Gueorguiev <53634432+izo0x90@users.noreply.github.com>
@ConnorGray @JoeLoser @owenhilyard Foundational changes broken off into their own branch/ PR. 😃 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, just 2 comments :)
Update the list creation to conform to upcoming List API changes that make the list size a `private attribute` Signed-off-by: Hristo I. Gueorguiev <53634432+izo0x90@users.noreply.github.com>
Awesome 😃, all set. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @izo0x90, thanks for splitting this off, this is great! 🙂
I've left a few minor comments, mostly suggestions that we include links to the POSIX docs where appropriate. Once those are addressed, I'll proceed with merging this in.
In the meantime, I'll !sync
this preemptively, just to ensure it passes internal CI.
Thanks again for contributing to Mojo 🔥
!sync |
Co-authored-by: Connor Gray <accounts@connorgray.com> Signed-off-by: Hristo (Izo) G. <53634432+izo0x90@users.noreply.github.com>
Co-authored-by: Connor Gray <accounts@connorgray.com> Signed-off-by: Hristo (Izo) G. <53634432+izo0x90@users.noreply.github.com>
Co-authored-by: Connor Gray <accounts@connorgray.com> Signed-off-by: Hristo (Izo) G. <53634432+izo0x90@users.noreply.github.com>
Co-authored-by: Connor Gray <accounts@connorgray.com> Signed-off-by: Hristo (Izo) G. <53634432+izo0x90@users.noreply.github.com>
Co-authored-by: Connor Gray <accounts@connorgray.com> Signed-off-by: Hristo (Izo) G. <53634432+izo0x90@users.noreply.github.com>
Co-authored-by: Connor Gray <accounts@connorgray.com> Signed-off-by: Hristo (Izo) G. <53634432+izo0x90@users.noreply.github.com>
Co-authored-by: Connor Gray <accounts@connorgray.com> Signed-off-by: Hristo (Izo) G. <53634432+izo0x90@users.noreply.github.com>
- `read_bytes` takes in Span[Byte] buffer as opposed to allocating to avoid n+1 alloc. issues etc. - Remove c_str_ptr type from ffi module since it is not a convention set by C lang., it will potentially get added back in at a later date after discussions and under its own PR - Doc string updates to libC funcs. Co-authored-by: Connor Gray <accounts@connorgray.com> Signed-off-by: Hristo (Izo) G. <53634432+izo0x90@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Co-authored-by: martinvuyk <110240700+martinvuyk@users.noreply.github.com> Signed-off-by: Hristo (Izo) G. <53634432+izo0x90@users.noreply.github.com>
Co-authored-by: martinvuyk <110240700+martinvuyk@users.noreply.github.com> Signed-off-by: Hristo (Izo) G. <53634432+izo0x90@users.noreply.github.com>
Co-authored-by: martinvuyk <110240700+martinvuyk@users.noreply.github.com> Signed-off-by: Hristo (Izo) G. <53634432+izo0x90@users.noreply.github.com>
8dd69a0
to
f2800a9
Compare
Awesome, thanks for incorporating the feedback @izo0x90 🙂 I'll go ahead and sync this in. |
!sync |
Sets up the foundation for implementing the
os/process
module PR with process module changesread_bytes
capability toFileDecscriptor