mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-28 15:02:32 +00:00
libc: do not open stdio descriptors unless configured to do so
Fix #2396
This commit is contained in:
parent
24a9537a27
commit
01e8f7ea3d
@ -82,6 +82,7 @@ class Libc::Vfs_plugin : public Libc::Plugin
|
|||||||
|
|
||||||
if (_root_dir.num_dirent("/"))
|
if (_root_dir.num_dirent("/"))
|
||||||
env.config([&] (Xml_node const &top) {
|
env.config([&] (Xml_node const &top) {
|
||||||
|
try {
|
||||||
Xml_node const node = top.sub_node("libc");
|
Xml_node const node = top.sub_node("libc");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -93,6 +94,7 @@ class Libc::Vfs_plugin : public Libc::Plugin
|
|||||||
_open_stdio(node, "stdin", 0, O_RDONLY);
|
_open_stdio(node, "stdin", 0, O_RDONLY);
|
||||||
_open_stdio(node, "stdout", 1, O_WRONLY);
|
_open_stdio(node, "stdout", 1, O_WRONLY);
|
||||||
_open_stdio(node, "stderr", 2, O_WRONLY);
|
_open_stdio(node, "stderr", 2, O_WRONLY);
|
||||||
|
} catch (Xml_node::Nonexistent_sub_node) { }
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user