Merge branch 'master' of https://github.com/redox-os/kernel
This commit is contained in:
commit
502b7bf89b
21 changed files with 80 additions and 42 deletions
|
@ -1 +1 @@
|
|||
Subproject commit ee284d86473467b3a3acf11199476612114a3d0a
|
||||
Subproject commit 7339814a20c78077b484e2bf89708293ec8e1111
|
|
@ -1,3 +1,6 @@
|
|||
[package]
|
||||
name = "init"
|
||||
version = "0.1.0"
|
||||
|
||||
[dependencies]
|
||||
syscall = { path = "../../syscall" }
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
extern crate syscall;
|
||||
|
||||
use std::env;
|
||||
use std::fs::File;
|
||||
use std::io::{BufRead, BufReader, Result};
|
||||
|
@ -50,6 +52,17 @@ pub fn run(file: &str) -> Result<()> {
|
|||
} else {
|
||||
println!("init: failed to run: no argument");
|
||||
},
|
||||
"stdio" => if let Some(stdio) = args.next() {
|
||||
let _ = syscall::close(2);
|
||||
let _ = syscall::close(1);
|
||||
let _ = syscall::close(0);
|
||||
|
||||
let _ = syscall::open(&stdio, syscall::flag::O_RDWR);
|
||||
let _ = syscall::open(&stdio, syscall::flag::O_RDWR);
|
||||
let _ = syscall::open(&stdio, syscall::flag::O_RDWR);
|
||||
} else {
|
||||
println!("init: failed to set stdio: no argument");
|
||||
},
|
||||
_ => {
|
||||
let mut command = Command::new(cmd);
|
||||
for arg in args {
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit ad2580cd35c6f6be0f09dfe279ffd93882e6b074
|
||||
Subproject commit 100ed07adfc02143dfa6b4ba81f988cfd2c7a835
|
|
@ -1 +1 @@
|
|||
Subproject commit 2212c9b4822c44af90164bffeef29d903e6b39da
|
||||
Subproject commit fa9156dee23d6da5b20a76f596c9ed263c7bd408
|
|
@ -1 +1 @@
|
|||
Subproject commit 3b7448c8fdb15857b813a90b2fba81393ef043be
|
||||
Subproject commit a05b8f4d258929af777041f1362c0b9fca4ad090
|
Loading…
Add table
Add a link
Reference in a new issue