mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:27:35 +00:00
LibC: stddbg should be opened with O_CLOEXEC.
This commit is contained in:
parent
6f9df89c92
commit
9ef06e2117
1 changed files with 1 additions and 1 deletions
|
@ -44,7 +44,7 @@ void __stdio_init()
|
||||||
init_FILE(*stdin, 0, isatty(0) ? _IOLBF : _IOFBF);
|
init_FILE(*stdin, 0, isatty(0) ? _IOLBF : _IOFBF);
|
||||||
init_FILE(*stdout, 1, isatty(1) ? _IOLBF : _IOFBF);
|
init_FILE(*stdout, 1, isatty(1) ? _IOLBF : _IOFBF);
|
||||||
init_FILE(*stderr, 2, _IONBF);
|
init_FILE(*stderr, 2, _IONBF);
|
||||||
int fd = open("/dev/debuglog", O_WRONLY);
|
int fd = open("/dev/debuglog", O_WRONLY | O_CLOEXEC);
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
perror("open /dev/debuglog");
|
perror("open /dev/debuglog");
|
||||||
ASSERT_NOT_REACHED();
|
ASSERT_NOT_REACHED();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue