mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-23 00:01:16 -03:00
more sanity involving fatal errors
This folds the "VOMIT_*" family of macros into the assert and DIE family. Another change related to issue #3276.
This commit is contained in:
@@ -6,7 +6,6 @@
|
||||
|
||||
// IWYU pragma: no_include <type_traits>
|
||||
#include <dirent.h>
|
||||
#include <errno.h>
|
||||
#include <pthread.h>
|
||||
#include <stddef.h>
|
||||
#include <wchar.h>
|
||||
@@ -113,10 +112,10 @@ void function_init() {
|
||||
// non-recursive lock but I haven't fully investigated all the call paths (for autoloading
|
||||
// functions, etc.).
|
||||
pthread_mutexattr_t a;
|
||||
VOMIT_ON_FAILURE(pthread_mutexattr_init(&a));
|
||||
VOMIT_ON_FAILURE(pthread_mutexattr_settype(&a, PTHREAD_MUTEX_RECURSIVE));
|
||||
VOMIT_ON_FAILURE(pthread_mutex_init(&functions_lock, &a));
|
||||
VOMIT_ON_FAILURE(pthread_mutexattr_destroy(&a));
|
||||
DIE_ON_FAILURE(pthread_mutexattr_init(&a));
|
||||
DIE_ON_FAILURE(pthread_mutexattr_settype(&a, PTHREAD_MUTEX_RECURSIVE));
|
||||
DIE_ON_FAILURE(pthread_mutex_init(&functions_lock, &a));
|
||||
DIE_ON_FAILURE(pthread_mutexattr_destroy(&a));
|
||||
}
|
||||
|
||||
static std::map<wcstring, env_var_t> snapshot_vars(const wcstring_list_t &vars) {
|
||||
|
||||
Reference in New Issue
Block a user