MCPcopy Create free account
hub / github.com/ElementsProject/lightning / destroy_msg_queue

Function destroy_msg_queue

common/msg_queue.c:27–35  ·  view source on GitHub ↗

Close any fds left in queue! */

Source from the content-addressed store, hash-verified

25
26/* Close any fds left in queue! */
27static void destroy_msg_queue(struct msg_queue *q)
28{
29 const u8 **elems = membuf_elems(&q->mb);
30 for (size_t i = 0; i < membuf_num_elems(&q->mb); i++) {
31 int fd = extract_fd(elems[i]);
32 if (fd != -1)
33 close(fd);
34 }
35}
36
37struct msg_queue *msg_queue_new(const tal_t *ctx, bool fd_passing)
38{

Callers

nothing calls this directly

Calls 1

extract_fdFunction · 0.85

Tested by

no test coverage detected