return len;
}
+ssize_t ustcomm_recv_event_notifier_notif_fd_from_sessiond(int sock,
+ int *_event_notifier_notif_fd)
+{
+ ssize_t nr_fd;
+ int event_notifier_notif_fd, ret;
+
+ /* Receive event_notifier notification fd */
+ lttng_ust_lock_fd_tracker();
+ nr_fd = ustcomm_recv_fds_unix_sock(sock, &event_notifier_notif_fd, 1);
+ if (nr_fd <= 0) {
+ lttng_ust_unlock_fd_tracker();
+ if (nr_fd < 0) {
+ ret = nr_fd;
+ goto error;
+ } else {
+ ret = -EIO;
+ goto error;
+ }
+ }
+
+ ret = lttng_ust_add_fd_to_tracker(event_notifier_notif_fd);
+ if (ret < 0) {
+ ret = close(event_notifier_notif_fd);
+ if (ret) {
+ PERROR("close on event_notifier notif fd");
+ }
+ ret = -EIO;
+ lttng_ust_unlock_fd_tracker();
+ goto error;
+ }
+
+ *_event_notifier_notif_fd = ret;
+ lttng_ust_unlock_fd_tracker();
+
+ ret = nr_fd;
+
+error:
+ return ret;
+}
+
int ustcomm_recv_stream_from_sessiond(int sock,
uint64_t *memory_map_size,
int *shm_fd, int *wakeup_fd)
reg_msg.uint64_t_alignment = uint64_t_alignment;
reg_msg.long_alignment = long_alignment;
reg_msg.socket_type = type;
- lttng_ust_getprocname(reg_msg.name);
+ lttng_pthread_getname_np(reg_msg.name, LTTNG_UST_ABI_PROCNAME_LEN);
memset(reg_msg.padding, 0, sizeof(reg_msg.padding));
len = ustcomm_send_unix_sock(sock, ®_msg, sizeof(reg_msg));