bunpen: exec: log more verbosely
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
use errors;
|
||||
use errors::ext;
|
||||
use fmt;
|
||||
use log;
|
||||
use os;
|
||||
use os::exec;
|
||||
@@ -13,6 +14,16 @@ use types::c;
|
||||
export fn execve(path: str, argv: []str, envp: []str = []) rt::errno = {
|
||||
let path_buf: [path::MAX]c::char = [0...];
|
||||
|
||||
{
|
||||
let logv: []fmt::formattable = [];
|
||||
defer free(logv);
|
||||
append(logv, "[exec] execve:");
|
||||
append(logv, path);
|
||||
for (let arg .. argv)
|
||||
append(logv, arg);
|
||||
log::println(logv...);
|
||||
};
|
||||
|
||||
syscall(
|
||||
rt::SYS_execve,
|
||||
make_cstr(&path_buf, path): uintptr: u64,
|
||||
|
Reference in New Issue
Block a user