NeoMutt  2022-04-29-369-gff76d0
Teaching an old dog new tricks
DOXYGEN
monitor.c File Reference

Monitor files for changes. More...

#include "config.h"
#include <errno.h>
#include <limits.h>
#include <poll.h>
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#include <sys/inotify.h>
#include <sys/stat.h>
#include <unistd.h>
#include "mutt/lib.h"
#include "core/lib.h"
#include "gui/lib.h"
#include "monitor.h"
#include "index/lib.h"
#include <fcntl.h>
+ Include dependency graph for monitor.c:

Go to the source code of this file.

Data Structures

struct  Monitor
 A watch on a file. More...
 
struct  MonitorInfo
 Information about a monitored file. More...
 

Macros

#define INOTIFY_MASK_DIR   (IN_MOVED_TO | IN_ATTRIB | IN_CLOSE_WRITE | IN_ISDIR)
 
#define INOTIFY_MASK_FILE   IN_CLOSE_WRITE
 
#define EVENT_BUFLEN   MAX(4096, sizeof(struct inotify_event) + NAME_MAX + 1)
 

Enumerations

enum  ResolveResult {
  RESOLVE_RES_FAIL_NOMAILBOX = -3 , RESOLVE_RES_FAIL_NOTYPE = -2 , RESOLVE_RES_FAIL_STAT = -1 , RESOLVE_RES_OK_NOTEXISTING = 0 ,
  RESOLVE_RES_OK_EXISTING = 1
}
 Results for the Monitor functions. More...
 

Functions

static void mutt_poll_fd_add (int fd, short events)
 Add a file to the watch list. More...
 
static int mutt_poll_fd_remove (int fd)
 Remove a file from the watch list. More...
 
static int monitor_init (void)
 Set up file monitoring. More...
 
static void monitor_check_free (void)
 Close down file monitoring. More...
 
static struct Monitormonitor_new (struct MonitorInfo *info, int descriptor)
 Create a new file monitor. More...
 
static void monitor_info_init (struct MonitorInfo *info)
 Set up a file monitor. More...
 
static void monitor_info_free (struct MonitorInfo *info)
 Shutdown a file monitor. More...
 
static void monitor_delete (struct Monitor *monitor)
 Free a file monitor. More...
 
static int monitor_handle_ignore (int desc)
 Listen for when a backup file is closed. More...
 
static enum ResolveResult monitor_resolve (struct MonitorInfo *info, struct Mailbox *m)
 Get the monitor for a mailbox. More...
 
int mutt_monitor_poll (void)
 Check for filesystem changes. More...
 
int mutt_monitor_add (struct Mailbox *m)
 Add a watch for a mailbox. More...
 
int mutt_monitor_remove (struct Mailbox *m)
 Remove a watch for a mailbox. More...
 

Variables

bool MonitorFilesChanged = false
 true after a monitored file has changed More...
 
bool MonitorContextChanged = false
 true after the current mailbox has changed More...
 
static int INotifyFd = -1
 
static struct MonitorMonitor = NULL
 
static size_t PollFdsCount = 0
 
static size_t PollFdsLen = 0
 
static struct pollfd * PollFds = NULL
 
static int MonitorContextDescriptor = -1
 

Detailed Description

Monitor files for changes.

Authors
  • Gero Treuer
  • R Primus

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Definition in file monitor.c.

Macro Definition Documentation

◆ INOTIFY_MASK_DIR

#define INOTIFY_MASK_DIR   (IN_MOVED_TO | IN_ATTRIB | IN_CLOSE_WRITE | IN_ISDIR)

Definition at line 60 of file monitor.c.

◆ INOTIFY_MASK_FILE

#define INOTIFY_MASK_FILE   IN_CLOSE_WRITE

Definition at line 61 of file monitor.c.

◆ EVENT_BUFLEN

#define EVENT_BUFLEN   MAX(4096, sizeof(struct inotify_event) + NAME_MAX + 1)

Definition at line 63 of file monitor.c.

Enumeration Type Documentation

◆ ResolveResult

Results for the Monitor functions.

Enumerator
RESOLVE_RES_FAIL_NOMAILBOX 

No Mailbox to work on.

RESOLVE_RES_FAIL_NOTYPE 

Can't identify Mailbox type.

RESOLVE_RES_FAIL_STAT 

Can't stat() the Mailbox file.

RESOLVE_RES_OK_NOTEXISTING 

File exists, no monitor is attached.

RESOLVE_RES_OK_EXISTING 

File exists, monitor is already attached.

Definition at line 68 of file monitor.c.

69{
75};
@ RESOLVE_RES_FAIL_NOTYPE
Can't identify Mailbox type.
Definition: monitor.c:71
@ RESOLVE_RES_FAIL_STAT
Can't stat() the Mailbox file.
Definition: monitor.c:72
@ RESOLVE_RES_OK_NOTEXISTING
File exists, no monitor is attached.
Definition: monitor.c:73
@ RESOLVE_RES_FAIL_NOMAILBOX
No Mailbox to work on.
Definition: monitor.c:70
@ RESOLVE_RES_OK_EXISTING
File exists, monitor is already attached.
Definition: monitor.c:74

Function Documentation

◆ mutt_poll_fd_add()

static void mutt_poll_fd_add ( int  fd,
short  events 
)
static

Add a file to the watch list.

Parameters
fdFile to watch
eventsEvents to listen for, e.g. POLLIN

Definition at line 109 of file monitor.c.

110{
111 int i = 0;
112 for (; (i < PollFdsCount) && (PollFds[i].fd != fd); i++)
113 ; // do nothing
114
115 if (i == PollFdsCount)
116 {
118 {
119 PollFdsLen += 2;
120 mutt_mem_realloc(&PollFds, PollFdsLen * sizeof(struct pollfd));
121 }
122 PollFdsCount++;
123 PollFds[i].fd = fd;
124 PollFds[i].events = events;
125 }
126 else
127 PollFds[i].events |= events;
128}
void mutt_mem_realloc(void *ptr, size_t size)
Resize a block of memory on the heap.
Definition: memory.c:114
static size_t PollFdsCount
Definition: monitor.c:54
static size_t PollFdsLen
Definition: monitor.c:55
static struct pollfd * PollFds
Definition: monitor.c:56
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mutt_poll_fd_remove()

static int mutt_poll_fd_remove ( int  fd)
static

Remove a file from the watch list.

Parameters
fdFile to remove
Return values
0Success
-1Error

Definition at line 136 of file monitor.c.

137{
138 int i = 0;
139 for (; (i < PollFdsCount) && (PollFds[i].fd != fd); i++)
140 ; // do nothing
141
142 if (i == PollFdsCount)
143 return -1;
144 int d = PollFdsCount - i - 1;
145 if (d != 0)
146 memmove(&PollFds[i], &PollFds[i + 1], d * sizeof(struct pollfd));
147 PollFdsCount--;
148 return 0;
149}
+ Here is the caller graph for this function:

◆ monitor_init()

static int monitor_init ( void  )
static

Set up file monitoring.

Return values
0Success
-1Error

Definition at line 156 of file monitor.c.

157{
158 if (INotifyFd != -1)
159 return 0;
160
161#ifdef HAVE_INOTIFY_INIT1
162 INotifyFd = inotify_init1(IN_NONBLOCK | IN_CLOEXEC);
163 if (INotifyFd == -1)
164 {
165 mutt_debug(LL_DEBUG2, "inotify_init1 failed, errno=%d %s\n", errno, strerror(errno));
166 return -1;
167 }
168#else
169 INotifyFd = inotify_init();
170 if (INotifyFd == -1)
171 {
172 mutt_debug(LL_DEBUG2, "monitor: inotify_init failed, errno=%d %s\n", errno,
173 strerror(errno));
174 return -1;
175 }
176 fcntl(INotifyFd, F_SETFL, O_NONBLOCK);
177 fcntl(INotifyFd, F_SETFD, FD_CLOEXEC);
178#endif
179 mutt_poll_fd_add(0, POLLIN);
181
182 return 0;
183}
#define mutt_debug(LEVEL,...)
Definition: logging.h:84
@ LL_DEBUG2
Log at debug level 2.
Definition: logging.h:41
static int INotifyFd
Definition: monitor.c:52
static void mutt_poll_fd_add(int fd, short events)
Add a file to the watch list.
Definition: monitor.c:109
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ monitor_check_free()

static void monitor_check_free ( void  )
static

Close down file monitoring.

Definition at line 188 of file monitor.c.

189{
190 if (!Monitor && (INotifyFd != -1))
191 {
193 close(INotifyFd);
194 INotifyFd = -1;
195 MonitorFilesChanged = false;
196 }
197}
static int mutt_poll_fd_remove(int fd)
Remove a file from the watch list.
Definition: monitor.c:136
bool MonitorFilesChanged
true after a monitored file has changed
Definition: monitor.c:49
A watch on a file.
Definition: monitor.c:81
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ monitor_new()

static struct Monitor * monitor_new ( struct MonitorInfo info,
int  descriptor 
)
static

Create a new file monitor.

Parameters
infoDetails of file to monitor
descriptorWatch descriptor
Return values
ptrNewly allocated Monitor

Definition at line 205 of file monitor.c.

206{
207 struct Monitor *monitor = mutt_mem_calloc(1, sizeof(struct Monitor));
208 monitor->type = info->type;
209 monitor->st_dev = info->st_dev;
210 monitor->st_ino = info->st_ino;
211 monitor->desc = descriptor;
212 monitor->next = Monitor;
213 if (info->type == MUTT_MH)
214 monitor->mh_backup_path = mutt_str_dup(info->path);
215
216 Monitor = monitor;
217
218 return monitor;
219}
@ MUTT_MH
'MH' Mailbox type
Definition: mailbox.h:47
void * mutt_mem_calloc(size_t nmemb, size_t size)
Allocate zeroed memory on the heap.
Definition: memory.c:50
static struct Monitor * Monitor
Definition: monitor.c:53
char * mutt_str_dup(const char *str)
Copy a string, safely.
Definition: string.c:250
dev_t st_dev
Definition: monitor.c:98
enum MailboxType type
Definition: monitor.c:95
ino_t st_ino
Definition: monitor.c:99
const char * path
Definition: monitor.c:97
struct Monitor * next
Linked list.
Definition: monitor.c:82
ino_t st_ino
Definition: monitor.c:85
dev_t st_dev
Definition: monitor.c:84
int desc
Definition: monitor.c:87
enum MailboxType type
Definition: monitor.c:86
char * mh_backup_path
Definition: monitor.c:83
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ monitor_info_init()

static void monitor_info_init ( struct MonitorInfo info)
static

Set up a file monitor.

Parameters
infoMonitor to initialise

Definition at line 225 of file monitor.c.

226{
227 memset(info, 0, sizeof(*info));
228}
+ Here is the caller graph for this function:

◆ monitor_info_free()

static void monitor_info_free ( struct MonitorInfo info)
static

Shutdown a file monitor.

Parameters
infoMonitor to shut down

Definition at line 234 of file monitor.c.

235{
237}
void mutt_buffer_dealloc(struct Buffer *buf)
Release the memory allocated by a buffer.
Definition: buffer.c:309
struct Buffer path_buf
access via path only (maybe not initialized)
Definition: monitor.c:101
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ monitor_delete()

static void monitor_delete ( struct Monitor monitor)
static

Free a file monitor.

Parameters
monitorMonitor to free

Definition at line 243 of file monitor.c.

244{
245 if (!monitor)
246 return;
247
248 struct Monitor **ptr = &Monitor;
249
250 while (true)
251 {
252 if (!*ptr)
253 return;
254 if (*ptr == monitor)
255 break;
256 ptr = &(*ptr)->next;
257 }
258
259 FREE(&monitor->mh_backup_path);
260 monitor = monitor->next;
261 FREE(ptr);
262 *ptr = monitor;
263}
#define FREE(x)
Definition: memory.h:43
+ Here is the caller graph for this function:

◆ monitor_handle_ignore()

static int monitor_handle_ignore ( int  desc)
static

Listen for when a backup file is closed.

Parameters
descWatch descriptor
Return values
>=0New descriptor
-1Error

Definition at line 271 of file monitor.c.

272{
273 int new_desc = -1;
274 struct Monitor *iter = Monitor;
275 struct stat st = { 0 };
276
277 while (iter && (iter->desc != desc))
278 iter = iter->next;
279
280 if (iter)
281 {
282 if ((iter->type == MUTT_MH) && (stat(iter->mh_backup_path, &st) == 0))
283 {
284 new_desc = inotify_add_watch(INotifyFd, iter->mh_backup_path, INOTIFY_MASK_FILE);
285 if (new_desc == -1)
286 {
287 mutt_debug(LL_DEBUG2, "inotify_add_watch failed for '%s', errno=%d %s\n",
288 iter->mh_backup_path, errno, strerror(errno));
289 }
290 else
291 {
292 mutt_debug(LL_DEBUG3, "inotify_add_watch descriptor=%d for '%s'\n",
293 desc, iter->mh_backup_path);
294 iter->st_dev = st.st_dev;
295 iter->st_ino = st.st_ino;
296 iter->desc = new_desc;
297 }
298 }
299 else
300 {
301 mutt_debug(LL_DEBUG3, "cleanup watch (implicitly removed) - descriptor=%d\n", desc);
302 }
303
304 if (MonitorContextDescriptor == desc)
305 MonitorContextDescriptor = new_desc;
306
307 if (new_desc == -1)
308 {
309 monitor_delete(iter);
311 }
312 }
313
314 return new_desc;
315}
@ LL_DEBUG3
Log at debug level 3.
Definition: logging.h:42
static void monitor_delete(struct Monitor *monitor)
Free a file monitor.
Definition: monitor.c:243
static int MonitorContextDescriptor
Definition: monitor.c:58
static void monitor_check_free(void)
Close down file monitoring.
Definition: monitor.c:188
#define INOTIFY_MASK_FILE
Definition: monitor.c:61
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ monitor_resolve()

static enum ResolveResult monitor_resolve ( struct MonitorInfo info,
struct Mailbox m 
)
static

Get the monitor for a mailbox.

Parameters
[out]infoDetails of the mailbox's monitor
[in]mMailbox
Return values
>=0mailbox is valid and locally accessible: 0: no monitor / 1: preexisting monitor
-3no mailbox (MonitorInfo: no fields set)
-2type not set
-1stat() failed (see errno; MonitorInfo fields: type, is_dir, path)

If m is NULL, try to get the current mailbox from the Index.

Definition at line 329 of file monitor.c.

330{
331 char *fmt = NULL;
332 struct stat st = { 0 };
333
334 struct Mailbox *m_cur = get_current_mailbox();
335 if (m)
336 {
337 info->type = m->type;
338 info->path = m->realpath;
339 }
340 else if (m_cur)
341 {
342 info->type = m_cur->type;
343 info->path = m_cur->realpath;
344 }
345 else
346 {
348 }
349
350 if (info->type == MUTT_UNKNOWN)
351 {
353 }
354 else if (info->type == MUTT_MAILDIR)
355 {
356 info->is_dir = true;
357 fmt = "%s/new";
358 }
359 else
360 {
361 info->is_dir = false;
362 if (info->type == MUTT_MH)
363 fmt = "%s/.mh_sequences";
364 }
365 if (fmt)
366 {
367 mutt_buffer_printf(&info->path_buf, fmt, info->path);
368 info->path = mutt_buffer_string(&info->path_buf);
369 }
370 if (stat(info->path, &st) != 0)
372
373 struct Monitor *iter = Monitor;
374 while (iter && ((iter->st_ino != st.st_ino) || (iter->st_dev != st.st_dev)))
375 iter = iter->next;
376
377 info->st_dev = st.st_dev;
378 info->st_ino = st.st_ino;
379 info->monitor = iter;
380
382}
int mutt_buffer_printf(struct Buffer *buf, const char *fmt,...)
Format a string overwriting a Buffer.
Definition: buffer.c:168
static const char * mutt_buffer_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
Definition: buffer.h:77
struct Mailbox * get_current_mailbox(void)
Get the current Mailbox.
Definition: index.c:618
@ MUTT_UNKNOWN
Mailbox wasn't recognised.
Definition: mailbox.h:44
@ MUTT_MAILDIR
'Maildir' Mailbox type
Definition: mailbox.h:48
A mailbox.
Definition: mailbox.h:79
char * realpath
Used for duplicate detection, context comparison, and the sidebar.
Definition: mailbox.h:81
enum MailboxType type
Mailbox type.
Definition: mailbox.h:102
struct Monitor * monitor
Definition: monitor.c:100
bool is_dir
Definition: monitor.c:96
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mutt_monitor_poll()

int mutt_monitor_poll ( void  )

Check for filesystem changes.

Return values
-3unknown/unexpected events: poll timeout / fds not handled by us
-2monitor detected changes, no STDIN input
-1error (see errno)
0(1) input ready from STDIN, or (2) monitoring inactive -> no poll()

Wait for I/O ready file descriptors or signals.

MonitorFilesChanged also reflects changes to monitored files.

Only STDIN and INotify file handles currently expected/supported. More would ask for common infrastructure (sockets?).

Definition at line 398 of file monitor.c.

399{
400 int rc = 0;
401 char buf[EVENT_BUFLEN] __attribute__((aligned(__alignof__(struct inotify_event))));
402
403 MonitorFilesChanged = false;
404
405 if (INotifyFd != -1)
406 {
407 int fds = poll(PollFds, PollFdsCount, MuttGetchTimeout);
408
409 if (fds == -1)
410 {
411 rc = -1;
412 if (errno != EINTR)
413 {
414 mutt_debug(LL_DEBUG2, "poll() failed, errno=%d %s\n", errno, strerror(errno));
415 }
416 }
417 else
418 {
419 bool input_ready = false;
420 for (int i = 0; fds && (i < PollFdsCount); i++)
421 {
422 if (PollFds[i].revents)
423 {
424 fds--;
425 if (PollFds[i].fd == 0)
426 {
427 input_ready = true;
428 }
429 else if (PollFds[i].fd == INotifyFd)
430 {
431 MonitorFilesChanged = true;
432 mutt_debug(LL_DEBUG3, "file change(s) detected\n");
433 char *ptr = buf;
434 const struct inotify_event *event = NULL;
435
436 while (true)
437 {
438 int len = read(INotifyFd, buf, sizeof(buf));
439 if (len == -1)
440 {
441 if (errno != EAGAIN)
442 {
443 mutt_debug(LL_DEBUG2, "read inotify events failed, errno=%d %s\n",
444 errno, strerror(errno));
445 }
446 break;
447 }
448
449 while (ptr < (buf + len))
450 {
451 event = (const struct inotify_event *) ptr;
452 mutt_debug(LL_DEBUG3, "+ detail: descriptor=%d mask=0x%x\n",
453 event->wd, event->mask);
454 if (event->mask & IN_IGNORED)
455 monitor_handle_ignore(event->wd);
456 else if (event->wd == MonitorContextDescriptor)
458 ptr += sizeof(struct inotify_event) + event->len;
459 }
460 }
461 }
462 }
463 }
464 if (!input_ready)
465 rc = MonitorFilesChanged ? -2 : -3;
466 }
467 }
468
469 return rc;
470}
int MuttGetchTimeout
Timeout in ms for mutt_getch()
Definition: curs_lib.c:124
static int monitor_handle_ignore(int desc)
Listen for when a backup file is closed.
Definition: monitor.c:271
bool MonitorContextChanged
true after the current mailbox has changed
Definition: monitor.c:50
#define EVENT_BUFLEN
Definition: monitor.c:63
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mutt_monitor_add()

int mutt_monitor_add ( struct Mailbox m)

Add a watch for a mailbox.

Parameters
mMailbox to watch
Return values
0success: new or already existing monitor
-1failed: no mailbox, inaccessible file, create monitor/watcher failed

If m is NULL, try to get the current mailbox from the Index.

Definition at line 480 of file monitor.c.

481{
482 struct MonitorInfo info;
483 monitor_info_init(&info);
484
485 int rc = 0;
486 enum ResolveResult desc = monitor_resolve(&info, m);
487 if (desc != RESOLVE_RES_OK_NOTEXISTING)
488 {
489 if (!m && (desc == RESOLVE_RES_OK_EXISTING))
490 MonitorContextDescriptor = info.monitor->desc;
491 rc = (desc == RESOLVE_RES_OK_EXISTING) ? 0 : -1;
492 goto cleanup;
493 }
494
495 uint32_t mask = info.is_dir ? INOTIFY_MASK_DIR : INOTIFY_MASK_FILE;
496 if (((INotifyFd == -1) && (monitor_init() == -1)) ||
497 ((desc = inotify_add_watch(INotifyFd, info.path, mask)) == -1))
498 {
499 mutt_debug(LL_DEBUG2, "inotify_add_watch failed for '%s', errno=%d %s\n",
500 info.path, errno, strerror(errno));
501 rc = -1;
502 goto cleanup;
503 }
504
505 mutt_debug(LL_DEBUG3, "inotify_add_watch descriptor=%d for '%s'\n", desc, info.path);
506 if (!m)
508
509 monitor_new(&info, desc);
510
511cleanup:
512 monitor_info_free(&info);
513 return rc;
514}
#define INOTIFY_MASK_DIR
Definition: monitor.c:60
static enum ResolveResult monitor_resolve(struct MonitorInfo *info, struct Mailbox *m)
Get the monitor for a mailbox.
Definition: monitor.c:329
static struct Monitor * monitor_new(struct MonitorInfo *info, int descriptor)
Create a new file monitor.
Definition: monitor.c:205
ResolveResult
Results for the Monitor functions.
Definition: monitor.c:69
static int monitor_init(void)
Set up file monitoring.
Definition: monitor.c:156
static void monitor_info_init(struct MonitorInfo *info)
Set up a file monitor.
Definition: monitor.c:225
static void monitor_info_free(struct MonitorInfo *info)
Shutdown a file monitor.
Definition: monitor.c:234
Information about a monitored file.
Definition: monitor.c:94
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mutt_monitor_remove()

int mutt_monitor_remove ( struct Mailbox m)

Remove a watch for a mailbox.

Parameters
mMailbox
Return values
0monitor removed (not shared)
1monitor not removed (shared)
2no monitor

If m is NULL, try to get the current mailbox from the Index.

Definition at line 525 of file monitor.c.

526{
527 struct MonitorInfo info, info2;
528 int rc = 0;
529
530 monitor_info_init(&info);
531 monitor_info_init(&info2);
532
533 if (!m)
534 {
536 MonitorContextChanged = false;
537 }
538
540 {
541 rc = 2;
542 goto cleanup;
543 }
544
545 struct Mailbox *m_cur = get_current_mailbox();
546 if (m_cur)
547 {
548 if (m)
549 {
550 if ((monitor_resolve(&info2, NULL) == RESOLVE_RES_OK_EXISTING) &&
551 (info.st_ino == info2.st_ino) && (info.st_dev == info2.st_dev))
552 {
553 rc = 1;
554 goto cleanup;
555 }
556 }
557 else
558 {
559 if (mailbox_find(m_cur->realpath))
560 {
561 rc = 1;
562 goto cleanup;
563 }
564 }
565 }
566
567 inotify_rm_watch(info.monitor->desc, INotifyFd);
568 mutt_debug(LL_DEBUG3, "inotify_rm_watch for '%s' descriptor=%d\n", info.path,
569 info.monitor->desc);
570
571 monitor_delete(info.monitor);
573
574cleanup:
575 monitor_info_free(&info);
576 monitor_info_free(&info2);
577 return rc;
578}
struct Mailbox * mailbox_find(const char *path)
Find the mailbox with a given path.
Definition: mailbox.c:139
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ MonitorFilesChanged

bool MonitorFilesChanged = false

true after a monitored file has changed

Definition at line 49 of file monitor.c.

◆ MonitorContextChanged

bool MonitorContextChanged = false

true after the current mailbox has changed

Definition at line 50 of file monitor.c.

◆ INotifyFd

int INotifyFd = -1
static

Definition at line 52 of file monitor.c.

◆ Monitor

struct Monitor* Monitor = NULL
static

Definition at line 53 of file monitor.c.

◆ PollFdsCount

size_t PollFdsCount = 0
static

Definition at line 54 of file monitor.c.

◆ PollFdsLen

size_t PollFdsLen = 0
static

Definition at line 55 of file monitor.c.

◆ PollFds

struct pollfd* PollFds = NULL
static

Definition at line 56 of file monitor.c.

◆ MonitorContextDescriptor

int MonitorContextDescriptor = -1
static

Definition at line 58 of file monitor.c.