mirror of git://git.musl-libc.org/musl
b06dc66639
this is both a minor scheduling optimization and a workaround for a difficult-to-fix bug in qemu app-level emulation. from the scheduling standpoint, it makes no sense to schedule the parent thread again until the child has exec'd or exited, since the parent will immediately block again waiting for it. on the qemu side, as regular application code running on an underlying libc, qemu cannot make arbitrary clone syscalls itself without confusing the underlying implementation. instead, it breaks them down into either fork-like or pthread_create-like cases. it was treating the code in posix_spawn as pthread_create-like, due to CLONE_VM, which caused horribly wrong behavior: CLONE_FILES broke the synchronization mechanism, CLONE_SIGHAND broke the parent's signals, and CLONE_THREAD caused the child's exec to end the parent -- if it hadn't already crashed. however, qemu special-cases CLONE_VFORK and emulates that with fork, even when CLONE_VM is also specified. this also gives incorrect semantics for code that really needs the memory sharing, but posix_spawn does not make use of the vm sharing except to avoid momentary double commit charge. programs using posix_spawn (including via popen) should now work correctly under qemu app-level emulation. |
||
---|---|---|
arch | ||
crt | ||
dist | ||
include | ||
lib | ||
src | ||
tools | ||
.gitignore | ||
COPYRIGHT | ||
INSTALL | ||
Makefile | ||
README | ||
WHATSNEW | ||
configure |
README
musl libc - a new standard library to power a new generation of Linux-based devices. musl is lightweight, fast, simple, free, and strives to be correct in the sense of standards-conformance and safety. musl is an alternative to glibc, eglibc, uClibc, dietlibc, and klibc. For reasons why one might prefer musl, please see the FAQ and libc comparison chart on the project website, http://www.musl-libc.org/ For installation instructions, see the INSTALL file. Please refer to the COPYRIGHT file for details on the copyright and license status of code included in musl (standard MIT license). Greetings! The 0.9.x release series for musl features interface coverage for all interfaces defined in ISO C99 and POSIX 2008 base, along with a number of non-standardized interfaces for compatibility with Linux, BSD, and glibc functionality. As the release series progresses, we are gradually adding support for incomplete functionality in existing interfaces, additional functions that are deemed to be important due to their use in real-world software, and support for new library and language features in C11 such as thread-local storage, which is now supported on all targets. In addition, support for additional target cpu architectures is being added. The number of packages build successfully against musl - either out-of-the-box or with minor patches to address portability errors - has exceeded 5000 and is steadily growing. In addition to application compatibility testing, unit testing has been conducted using three separate test frameworks and numerous additional standalone test cases to verify the correctness of the implementation. Included with this package is a gcc wrapper script (musl-gcc) which allows you to build musl-linked programs using an existing gcc 3.x or 4.x toolchain on the host. There are also now at several mini distributions (in the form of build scripts) which provide a self-hosting musl-based toolchain and system root. These are much better options than the wrapper script if you wish to use dynamic linking or build packages with many library dependencies. See the musl website for details. The musl project is actively seeking contributors, mostly in the areas of porting, testing, and application compatibility improvement. For bug reports, support requests, or to get involved in development, please visit #musl on Freenode IRC or subscribe to the musl mailing list by sending a blank email to musl-subscribe AT lists DOT openwall DOT com. Thank you for using musl. Cheers, Rich Felker / dalias