mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-01-31 03:27:39 +00:00
60cb435cb4
If threads are being used, then fork() will now acquire and release and runtime locks so that fork() may be safely used from threads. This also makes vfork() thread safe, because pthread mutexes will do nothing when the process is a child of vfork(). More torture tests have been written to confirm this all works like a charm. Additionally: - Invent hexpcpy() api - Rename nsync_malloc_() to kmalloc() - Complete posix named semaphore implementation - Make pthread_create() asynchronous signal safe - Add rm, rmdir, and touch to command interpreter builtins - Invent sigisprecious() and modify sigset functions to use it - Add unit tests for posix_spawn() attributes and fix its bugs One unresolved problem is the reclaiming of *NSYNC waiter memory in the forked child processes, within apps which have threads waiting on locks
32 lines
774 B
C
32 lines
774 B
C
#ifndef COSMOPOLITAN_LIBC_SYSV_CONSTS_EX_H_
|
|
#define COSMOPOLITAN_LIBC_SYSV_CONSTS_EX_H_
|
|
|
|
/**
|
|
* @fileoverview Eric Allman's exit() codes
|
|
*
|
|
* - Broadly supported style guideline;
|
|
* - Dating back to 1980 in 4.0BSD;
|
|
* - That won't be standardized.
|
|
*
|
|
*/
|
|
|
|
#define EX_CANTCREAT 73
|
|
#define EX_CONFIG 78
|
|
#define EX_DATAERR 65
|
|
#define EX_IOERR 74
|
|
#define EX_NOHOST 68
|
|
#define EX_NOINPUT 66
|
|
#define EX_NOPERM 77
|
|
#define EX_NOUSER 67
|
|
#define EX_OK 0
|
|
#define EX_OSERR 71
|
|
#define EX_OSFILE 72
|
|
#define EX_PROTOCOL 76
|
|
#define EX_SOFTWARE 70
|
|
#define EX_TEMPFAIL 75
|
|
#define EX_UNAVAILABLE 69
|
|
#define EX_USAGE 64
|
|
#define EX__BASE 64
|
|
#define EX__MAX 78
|
|
|
|
#endif /* COSMOPOLITAN_LIBC_SYSV_CONSTS_EX_H_ */
|