Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
K
kernel
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
redox-os
kernel
Commits
863c59d3
Commit
863c59d3
authored
8 years ago
by
Jeremy Soller
Browse files
Options
Downloads
Patches
Plain Diff
Increase buffer size when reading executable, update libstd
parent
eeb1cd0a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
scheme/user.rs
+1
-1
1 addition, 1 deletion
scheme/user.rs
syscall/process.rs
+3
-1
3 additions, 1 deletion
syscall/process.rs
with
4 additions
and
2 deletions
scheme/user.rs
+
1
−
1
View file @
863c59d3
...
...
@@ -9,7 +9,7 @@ use syscall::{convert_to_result, Call, Error, Result};
use
super
::
Scheme
;
#[derive(Copy,
Clone,
Debug)]
#[derive(Copy,
Clone,
Debug
,
Default
)]
#[repr(packed)]
pub
struct
Packet
{
pub
id
:
usize
,
...
...
This diff is collapsed.
Click to expand it.
syscall/process.rs
+
3
−
1
View file @
863c59d3
...
...
@@ -178,6 +178,8 @@ pub fn clone(flags: usize, stack_base: usize) -> Result<usize> {
}
}
// If not cloning files, dup to get a new number from scheme
// This has to be done outside the context lock to prevent deadlocks
if
flags
&
CLONE_FILES
==
0
{
for
(
fd
,
mut
file_option
)
in
files
.lock
()
.iter_mut
()
.enumerate
()
{
let
new_file_option
=
if
let
Some
(
file
)
=
*
file_option
{
...
...
@@ -357,7 +359,7 @@ pub fn exec(path: &[u8], arg_ptrs: &[[usize; 2]]) -> Result<usize> {
//TODO: Only read elf header, not entire file. Then read required segments
let
mut
data
=
vec!
[];
loop
{
let
mut
buf
=
[
0
;
4096
];
let
mut
buf
=
[
0
;
16384
];
let
count
=
syscall
::
read
(
file
,
&
mut
buf
)
?
;
if
count
>
0
{
data
.extend_from_slice
(
&
buf
[
..
count
]);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment