This file is indexed.

/usr/include/bglibs/unix/trigger.h is in libbg1-dev 1.106-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#ifndef BGLIBS__UNIX__TRIGGER__H__
#define BGLIBS__UNIX__TRIGGER__H__

#include <sysdeps.h>

/** \defgroup trigger trigger: Safe external event notification

The \c trigger functions provide a safe mechanism for one program to
notify another that an event has happened, using a named pipe.

The traditional UNIX mechanism for doing this has been to use signals.
Signals, however, suffer from several problems.  First, in order to
deliver a signal, the sender needs to determine the PID of the
recipient.  The process of determining the PID is filled with race
conditions leaving the possibility of delivering the signal to the wrong
process.  On the receiving side, receiving the signal puts the receiver
into an execution context where the set of safe system calls is
restricted.

By using a named pipe, the trigger mechanism avoids both these problems.
First, there are no races in accessing the trigger, and no blocking
paths either.  Secondly, the receiver waits for an event by polling the
file descriptor.  Upon receiving an event, the receiver is in the same
state as normal.

Such events might include a new message being added to a queue etc.  No
data is delivered with the event.

@{ */

extern int trigger_set(iopoll_fd* io, const char* path);

/** Determine if a trigger has been pulled, after a polling loop
    indicates activity. */
#define trigger_pulled(IO) ((IO)->revents)

extern void trigger_pull(const char* path);

/** @} */

#endif