- 26 4月, 2011 4 次提交
-
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
-
- 25 4月, 2011 1 次提交
-
-
由 Rich Felker 提交于
1. failed match of literal chars from the format string would always return matching failure rather than input failure at eof, leading to infinite loops in some programs. 2. unread of eof would wrongly adjust the character counts reported by %n, yielding an off-by-one error.
-
- 23 4月, 2011 2 次提交
-
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
-
- 22 4月, 2011 5 次提交
-
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
this is explicitly allowed by POSIX
-
- 21 4月, 2011 12 次提交
-
-
由 Rich Felker 提交于
some functions that should have been testing whether pthread_self() had been called and initialized the thread pointer were instead testing whether pthread_create() had been called and actually made the program "threaded". while it's unlikely any mismatch would occur in real-world problems, this could have introduced subtle bugs. now, we store the address of the main thread's thread descriptor in the libc structure and use its presence as a flag that the thread register is initialized. note that after fork, the calling thread (not necessarily the original main thread) is the new main thread.
-
由 Rich Felker 提交于
the linux documentation for dup2 says it can fail with EBUSY due to a race condition with open and dup in the kernel. shield applications (and the rest of libc) from this nonsense by looping until it succeeds
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
the check against MADV_DONTNEED to because linux MADV_DONTNEED semantics conflict dangerously with the POSIX semantics
-
由 Rich Felker 提交于
-
- 20 4月, 2011 4 次提交
-
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
this also de-uglifies the dummy function aliasing a bit.
-
由 Rich Felker 提交于
-
- 19 4月, 2011 6 次提交
-
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
these functions are allowed to be cancellation points, but then we would have to install cleanup handlers to avoid termination with locks held.
-
由 Rich Felker 提交于
we already checked before making the syscall, but it's possible that a signal handler interrupted the blocking syscall and disabled cancellation, and that this is the cause of EINTR. in this case, the old behavior was testably wrong.
-
由 Rich Felker 提交于
like all other syscalls, close should return to the caller if and only if it successfully performed its action. it is necessary that the application be able to determine whether the close succeeded.
-
- 18 4月, 2011 6 次提交
-
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
clean and simple, but fails when the caller does not have permissions to open the file for reading or when /proc is not available. i may replace this with a full implementation later, possibly leaving this version as an optimization to use when it works.
-
由 Rich Felker 提交于
if the exit was caused by cancellation, __cancel has already set these flags anyway.
-
由 Rich Felker 提交于
cancellation frames were not correctly popped, so this usage would not only loop, but also reuse discarded and invalid parts of the stack.
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
don't waste time (and significant code size due to function call overhead!) setting errno when the result of a syscall does not matter or when it can't fail.
-