LibC: Lock file during gets
This commit is contained in:
parent
b9da6a4a5d
commit
04463675c0
|
@ -611,6 +611,7 @@ ssize_t getline(char** __restrict lineptr, size_t* __restrict n, FILE* __restric
|
||||||
|
|
||||||
char* gets(char* buffer)
|
char* gets(char* buffer)
|
||||||
{
|
{
|
||||||
|
ScopeLock _(stdin);
|
||||||
if (stdin->eof)
|
if (stdin->eof)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue