projects
/
lttng-ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add channel wakeup fd to monitor close
[lttng-ust.git]
/
liblttng-ust-comm
/
lttng-ust-comm.c
diff --git
a/liblttng-ust-comm/lttng-ust-comm.c
b/liblttng-ust-comm/lttng-ust-comm.c
index a666ab274b5f3a25af9f77f5cea779938d2da986..00b1d43af0a4ec1610e4d1a83d204a2c064236b3 100644
(file)
--- a/
liblttng-ust-comm/lttng-ust-comm.c
+++ b/
liblttng-ust-comm/lttng-ust-comm.c
@@
-546,10
+546,12
@@
int ustcomm_send_app_cmd(int sock,
* expected var_len.
*/
ssize_t ustcomm_recv_channel_from_sessiond(int sock,
* expected var_len.
*/
ssize_t ustcomm_recv_channel_from_sessiond(int sock,
- void **_chan_data, uint64_t var_len)
+ void **_chan_data, uint64_t var_len,
+ int *_wakeup_fd)
{
void *chan_data;
{
void *chan_data;
- ssize_t len;
+ ssize_t len, nr_fd;
+ int wakeup_fd;
if (var_len > LTTNG_UST_CHANNEL_DATA_MAX_LEN) {
len = -EINVAL;
if (var_len > LTTNG_UST_CHANNEL_DATA_MAX_LEN) {
len = -EINVAL;
@@
-565,6
+567,18
@@
ssize_t ustcomm_recv_channel_from_sessiond(int sock,
if (len != var_len) {
goto error_recv;
}
if (len != var_len) {
goto error_recv;
}
+ /* recv wakeup fd */
+ nr_fd = ustcomm_recv_fds_unix_sock(sock, &wakeup_fd, 1);
+ if (nr_fd <= 0) {
+ if (nr_fd < 0) {
+ len = nr_fd;
+ goto error_recv;
+ } else {
+ len = -EIO;
+ goto error_recv;
+ }
+ }
+ *_wakeup_fd = wakeup_fd;
*_chan_data = chan_data;
return len;
*_chan_data = chan_data;
return len;
This page took
0.024228 seconds
and
4
git commands to generate.