open-vm-tools 12.5.0
signalSource.c File Reference
#include "vm_assert.h"
#include "vmware/tools/utils.h"
#include <errno.h>
#include <fcntl.h>
#include <string.h>
#include <unistd.h>
Include dependency graph for signalSource.c:

Macros

#define MAX_SIGNALS   64
 

Typedefs

typedef struct SignalHandler SignalHandler
 
typedef struct SignalSource SignalSource
 

Enumerations

enum  SignalState { SIG_SRC_UNHANDLED = 0 , SIG_SRC_IDLE , SIG_SRC_SIGNALED }
 

Functions

 G_LOCK_DEFINE_STATIC (gLock)
 
GSource * VMTools_NewSignalSource (int signum)
 

Detailed Description

A GSource implementation that is activated by OS signals.

Caveat: if the process is receiving a lot of signals in a short period of time, it's possible that the sources will not be notified for all the instances of a particular signal. So this mechanism shouldn't be used for reliable event delivery.