-
Notifications
You must be signed in to change notification settings - Fork 79
Implement /proc/<pid>/exe
#259
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,6 +12,7 @@ use crate::{ | |
| process::{ctx::Context, thread_group::signal::SignalActionState}, | ||
| sched::current::current_task, | ||
| }; | ||
| use alloc::borrow::ToOwned; | ||
| use alloc::{string::String, vec}; | ||
| use alloc::{string::ToString, sync::Arc, vec::Vec}; | ||
| use auxv::{AT_BASE, AT_ENTRY, AT_NULL, AT_PAGESZ, AT_PHDR, AT_PHENT, AT_PHNUM, AT_RANDOM}; | ||
|
|
@@ -212,6 +213,7 @@ async fn exec_elf( | |
| let mut fd_table = current_task().fd_table.lock_save_irq().clone(); | ||
| fd_table.close_cloexec_entries().await; | ||
| *current_task().fd_table.lock_save_irq() = fd_table; | ||
| *current_task().process.executable.lock_save_irq() = Some(path.to_owned()); | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I do that here |
||
|
|
||
| Ok(()) | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -90,6 +90,7 @@ impl ThreadGroupBuilder { | |
| next_tid: AtomicU32::new(1), | ||
| state: SpinLock::new(ProcessState::Running), | ||
| tasks: SpinLock::new(BTreeMap::new()), | ||
| executable: SpinLock::new(None), | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't see where during a |
||
| }); | ||
|
|
||
| TG_LIST | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.