*
*/
+#include <common/compat/fcntl.h>
#include <common/sessiond-comm/sessiond-comm.h>
#include <common/payload.h>
#include <common/payload-view.h>
#include <common/utils.h>
#include <common/defaults.h>
#include <tap/tap.h>
-#include <sys/eventfd.h>
#include <stdbool.h>
#include <common/error.h>
#include <lttng/constant.h>
for (i = 0; i < fd_count; i++) {
struct fd_handle *handle;
- const int fd = eventfd(0, 0);
+ int fd = fcntl(STDOUT_FILENO, F_DUPFD, 0);
if (fd < 0) {
- PERROR("Failed to create event fd while creating test payload");
+ PERROR("Failed to create fd while creating test payload");
goto error;
}
handle = fd_handle_create(fd);
if (!handle) {
if (close(fd)) {
- PERROR("Failed to close event fd while preparing test payload");
+ PERROR("Failed to close fd while preparing test payload");
goto error;
}
}
goto error;
}
- fd = eventfd(0, 0);
+ fd = fcntl(STDOUT_FILENO, F_DUPFD, 0);
if (fd < 0) {
- PERROR("Failed to create event fd while creating test payload");
+ PERROR("Failed to create fd while creating test payload");
goto error;
}
handle = fd_handle_create(fd);
if (!handle) {
if (close(fd)) {
- PERROR("Failed to close event fd while preparing test payload");
+ PERROR("Failed to close fd while preparing test payload");
goto error;
}
}
goto error;
}
- fd = eventfd(0, 0);
+ fd = fcntl(STDOUT_FILENO, F_DUPFD, 0);
if (fd < 0) {
- PERROR("Failed to create event fd while creating test payload");
+ PERROR("Failed to create fd while creating test payload");
goto error;
}
handle = fd_handle_create(fd);
if (!handle) {
if (close(fd)) {
- PERROR("Failed to close event fd while preparing test payload");
+ PERROR("Failed to close fd while preparing test payload");
goto error;
}
}