mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-21 23:11:17 -03:00
Make miscellaneous variables thread-safe
This commit is contained in:
@@ -1261,8 +1261,8 @@ bool completer_t::try_complete_user(const wcstring &str) {
|
||||
bool result = false;
|
||||
size_t name_len = str.length() - 1;
|
||||
|
||||
static std::mutex lock;
|
||||
scoped_lock locker(lock);
|
||||
static std::mutex s_setpwent_lock;
|
||||
scoped_lock locker(s_setpwent_lock);
|
||||
setpwent();
|
||||
// cppcheck-suppress getpwentCalled
|
||||
while (struct passwd *pw = getpwent()) {
|
||||
|
||||
Reference in New Issue
Block a user