#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include <dirent.h>
#include <fcntl.h>
#include "debug.h"
#include "config.h"
#include "utils.h"
#include "pcscd.h"
#include "sys_generic.h"
Go to the source code of this file.
Defines | |
#define | OPENCT_FILE "/var/run/openct/status" |
Check is OpenCT is running and display a critical message if it is. | |
Functions | |
pid_t | GetDaemonPid (void) |
int | SendHotplugSignal (void) |
int | StatSynchronize (struct pubReaderStatesList *readerState) |
Sends an asynchronous event to any waiting client. | |
int | StatSynchronizeContext (SCARDCONTEXT hContext) |
Sends an asynchronous event to a specific waiting client. | |
int | CheckForOpenCT (void) |
Definition in file utils.c.
#define OPENCT_FILE "/var/run/openct/status" |
int StatSynchronize | ( | struct pubReaderStatesList * | readerState | ) |
Sends an asynchronous event to any waiting client.
Just write 1 byte to any fifo in PCSCLITE_EVENTS_DIR and remove the file
This function must be secured since the files are created by the library or any non privileged process. We must not follow symlinks for example
Definition at line 87 of file utils.c.
References SYS_CloseFile(), SYS_GetPageSize(), SYS_MMapSynchronize(), and SYS_OpenFile().
Referenced by SCardConnect(), SCardDisconnect(), and SCardReconnect().
int StatSynchronizeContext | ( | SCARDCONTEXT | hContext | ) |
Sends an asynchronous event to a specific waiting client.
Just write 1 byte to a specific fifo in PCSCLITE_EVENTS_DIR and remove the file
This function must be secured since the files are created by the library or any non privileged process. We must not follow symlinks for example
Definition at line 162 of file utils.c.
References SYS_CloseFile(), SYS_GetPID(), and SYS_OpenFile().
Referenced by SCardCancel().