Commit Graph

8 Commits

Author SHA1 Message Date
Ben Wiederhake
6fd478b6ce Everywhere: Remove unused includes of AK/Format.h
These instances were detected by searching for files that include
AK/Format.h, but don't match the regex:

\\b(CheckedFormatString|critical_dmesgln|dbgln|dbgln_if|dmesgln|FormatBu
ilder|__FormatIfSupported|FormatIfSupported|FormatParser|FormatString|Fo
rmattable|Formatter|__format_value|HasFormatter|max_format_arguments|out
|outln|set_debug_enabled|StandardFormatter|TypeErasedFormatParams|TypeEr
asedParameter|VariadicFormatParams|v_critical_dmesgln|vdbgln|vdmesgln|vf
ormat|vout|warn|warnln|warnln_if)\\b

(Without the linebreaks.)

This regex is pessimistic, so there might be more files that don't
actually use any formatting functions.

Observe that this revealed that Userland/Libraries/LibC/signal.cpp is
missing an include.

In theory, one might use LibCPP to detect things like this
automatically, but let's do this one step after another.
2023-01-02 20:27:20 -05:00
Andreas Kling
821c80848f LibC: Remove debug spam from openpty() 2021-10-26 08:47:06 +02:00
David Carlier
594dfaadb9 LibC: openpty error handling update 2021-05-30 08:41:17 +02:00
Gunnar Beutner
3ef6e31ded
LibC: Use ptsname_r() instead of ptsname() in openpty() (#7231)
This improves thread-safety because ptsname() is using a global
buffer that is shared between threads.
2021-05-18 08:08:30 +02:00
Jean-Baptiste Boric
e16894af5a LibC: Do not include errno.h inside unistd.h
POSIX does not mandate this, therefore let's not do it.
2021-05-14 22:24:02 +02:00
Linus Groh
877996465a LibC: Update forkpty() master fd before fork()'s child branch 2021-05-06 14:04:07 +01:00
Linus Groh
5391836468 LibC: Remove 'int* aslave' parameter from forkpty()
Only keep track of that (and eventually close() it) internally instead.
This argument is not present on other systems, so we were running into
compatibility issues with ports.
Also bring the implementation closer to Linux and OpenBSD by making sure
to close the slave pty fd in the fork()'d child as well as _exit()'ing
on login_tty() failure - it's non-POSIX, so those are our references
here. :^)
2021-05-06 13:52:46 +01:00
Gunnar Beutner
f48f26f52d LibC: Implement openpty(), forkpty() and login_tty()
These are used by OpenSSH.
2021-04-30 23:10:22 +02:00