mirror of
https://github.com/ish-app/ish.git
synced 2026-05-28 21:10:35 +00:00
13 lines
217 B
C
13 lines
217 B
C
#include <unistd.h>
|
|
#include "util/sync.h"
|
|
|
|
static lock_t fchdir_lock = LOCK_INITIALIZER;
|
|
|
|
void lock_fchdir(int dirfd) {
|
|
lock(&fchdir_lock);
|
|
fchdir(dirfd);
|
|
}
|
|
|
|
void unlock_fchdir() {
|
|
unlock(&fchdir_lock);
|
|
} |