* Protect the lttng_fd_set. Nests within the ust_lock, and therefore
* within the libc dl lock. Therefore, we need to fixup the TLS before
* nesting into this lock.
* Protect the lttng_fd_set. Nests within the ust_lock, and therefore
* within the libc dl lock. Therefore, we need to fixup the TLS before
* nesting into this lock.
/*
* Track whether we are within lttng-ust or application, for close
* system call override by LD_PRELOAD library.
/*
* Track whether we are within lttng-ust or application, for close
* system call override by LD_PRELOAD library.
pthread_mutex_unlock(&ust_safe_guard_fd_mutex);
/*
* Ensure the compiler don't move the store before the close()
pthread_mutex_unlock(&ust_safe_guard_fd_mutex);
/*
* Ensure the compiler don't move the store before the close()
int fd_to_close[STDERR_FILENO + 1];
int fd_to_close_count = 0;
int dup_cmd = F_DUPFD; /* Default command */
int fd_to_close[STDERR_FILENO + 1];
int fd_to_close_count = 0;
int dup_cmd = F_DUPFD; /* Default command */
ret = close(fd_to_close[i]);
if (ret) {
PERROR("close on temporary fd: %d.", fd_to_close[i]);
ret = close(fd_to_close[i]);
if (ret) {
PERROR("close on temporary fd: %d.", fd_to_close[i]);