Construct Terminal_session within with_libc

The "pipe" procedure can only be safely called within with_libc.

Fix #3408
This commit is contained in:
Ehmry - 2019-06-05 16:00:52 +02:00 committed by Christian Helmuth
parent eaed28f68d
commit 12127a7bd2
1 changed files with 1 additions and 1 deletions

View File

@ -1513,7 +1513,7 @@ class Terminal::Root_component : public Genode::Root_component<Session_component
});
try {
_server.attach_terminal(*s);
Libc::with_libc([&] () { _server.attach_terminal(*s); });
return s;
} catch (...) {
Genode::destroy(md_alloc(), s);