mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-18 21:27:56 +00:00
Let tcgetattr succeed for libc_log
At the startup of python's termios module, a sequence of 'tcgetattr' and 'tcsetattr' calls is executed. If one of those calls fails, the initialization gets canceled. 'tcgetattr' is implemented via ioctl operations on stdout. To let those operations succeed, the default implementation of ioctl ('Plugin::ioctl') cannot be used because it returns -1. Adding a dummy ioctl to the libc_log back end alleviates this problem.
This commit is contained in:
parent
1bd2b0ec08
commit
8cb27e2813
@ -96,6 +96,18 @@ namespace {
|
||||
}
|
||||
return orig_count;
|
||||
}
|
||||
|
||||
int ioctl(Libc::File_descriptor *, int request, char *)
|
||||
{
|
||||
/*
|
||||
* Some programs or libraries use to perform 'TIOCGETA'
|
||||
* operations on stdout, in particular the termios module of
|
||||
* Python. Those programs may break if 'tcgetattr' return with
|
||||
* an error. We pretend to be more successful than we really
|
||||
* are to make them happy.
|
||||
*/
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user