Svcsetalarmcallback() - VeriFone MX800 series Programmer's Manual

Hide thumbs Also See for MX800 series:
Table of Contents

Advertisement

svcSetAlarmCallback()

The svcSetAlarmCallback() function is used to specify a function that an
application wants to be called whenever the SIGALRM signal is issued by that
process. The application should call this function whenever it wants to register a
callback function to be called when the SIGALRM signal is issued and it should
provide the process ID of the process that will issue the signal. The process ID
can be determined by issuing the command getpid() as long as
svcSetAlarmCallback() is called in the same process as the one issuing the
signal. If the application creates any threads that will issue the SIGALRM signal,
the process ID of that thread must be registered with the
svcSetAlarmCallback(). If svcSetAlarmCallback() is always called from
the same process/thread as the one issuing the signal, there is never a problem.
However, if the svcSetAlarmCallback() is called from a different process/
thread than the one that will issue the SIGALRM signal, then it is the responsibility
of the application to manage this. When an application wants to issue the
SIGALRM signal, the function svcAlarm() can be used to conveniently
sleep() for the specified amount of seconds and issue the SIGALRM signal.
Prototype
int svcSetAlarmCallback(int pid, void (*rxfp)(void))
Parameters
Process ID of the process that will issue the SIGALRM signal.
pid
Function pointer which points to function to be called when
(*rxfp) (void)
SIGALRM signal has been issued.
Return Values
The function returns 0 on success or a negative errno value if unsuccessful.
S
ERVICE
svcSetAlarmCallback()
X
M
800 S
P
ERIES
ROGRAMMERS
F
UNCTIONS
165
G
UIDE

Advertisement

Table of Contents
loading

Table of Contents