if (lum->handle == LTTNG_UST_ROOT_HANDLE)
ret = -EPERM;
else
- ret = lttng_ust_objd_unref(lum->handle);
+ ret = lttng_ust_objd_unref(lum->handle, 1);
break;
case LTTNG_UST_FILTER:
{
sock_info->notify_socket = -1;
}
if (sock_info->root_handle != -1) {
- ret = lttng_ust_objd_unref(sock_info->root_handle);
+ ret = lttng_ust_objd_unref(sock_info->root_handle, 1);
if (ret) {
ERR("Error unref root handle");
}
sock_info->notify_socket = open_sock[1];
timeout = get_notify_sock_timeout();
- if (timeout > 0) {
+ if (timeout >= 0) {
+ /*
+ * Give at least 10ms to sessiond to reply to
+ * notifications.
+ */
+ if (timeout < 10)
+ timeout = 10;
ret = ustcomm_setsockopt_rcv_timeout(sock_info->notify_socket,
timeout);
if (ret < 0) {
if (ret < 0) {
WARN("Error setting socket send timeout");
}
- } else if (timeout == -1) {
- ret = fcntl(sock_info->notify_socket, F_SETFL, O_NONBLOCK);
- if (ret < 0) {
- WARN("Error setting socket to non-blocking");
- }
- } else {
- if (timeout != 0) {
- WARN("Unsuppoorted timeout value %ld", timeout);
- }
+ } else if (timeout < -1) {
+ WARN("Unsuppoorted timeout value %ld", timeout);
}
/*