Add signal handler so code coverage records coverage

(Logical change 1.67)


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@244 fd59a12c-fef9-0310-b244-a6a79926bd2f
This commit is contained in:
Steven Dake 2004-09-08 08:11:56 +00:00
parent 0097a3d7d1
commit 3241af44d0
7 changed files with 56 additions and 0 deletions

View File

@ -35,6 +35,8 @@
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <signal.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
@ -238,6 +240,11 @@ static struct sched_param sched_param = {
sched_priority: 99
};
void sigintr_handler (int signum) {
exit (0);
}
int main (void) {
SaAmfHandleT handle;
int result;
@ -245,6 +252,7 @@ int main (void) {
fd_set read_fds;
SaNameT compName;
signal (SIGINT, sigintr_handler);
result = sched_setscheduler (0, SCHED_RR, &sched_param);
if (result == -1) {
printf ("couldn't set sched priority\n");

View File

@ -36,6 +36,7 @@
#include <stdlib.h>
#include <errno.h>
#include <unistd.h>
#include <signal.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
@ -235,6 +236,11 @@ SaAmfCallbacksT amfCallbacks = {
SaVersionT version = { 'A', 1, 1 };
void sigintr_handler (int signum) {
exit (0);
}
int main (void) {
SaAmfHandleT handle;
int result;
@ -244,6 +250,8 @@ int main (void) {
int i;
SaAmfErrorDescriptorT errorDescriptor;
signal (SIGINT, sigintr_handler);
result = saAmfInitialize (&handle, &amfCallbacks, &version);
if (result != SA_OK) {
printf ("initialize result is %d\n", result);

View File

@ -35,6 +35,8 @@
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <signal.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
@ -233,6 +235,11 @@ SaAmfCallbacksT amfCallbacks = {
SaVersionT version = { 'A', 1, 1 };
void sigintr_handler (int signum) {
exit (0);
}
int main (void) {
SaAmfHandleT handle;
int result;
@ -240,6 +247,7 @@ int main (void) {
fd_set read_fds;
SaNameT compName;
signal (SIGINT, sigintr_handler);
result = saAmfInitialize (&handle, &amfCallbacks, &version);
if (result != SA_OK) {
printf ("initialize result is %d\n", result);

View File

@ -35,6 +35,8 @@
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <signal.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
@ -232,6 +234,11 @@ SaAmfCallbacksT amfCallbacks = {
SaVersionT version = { 'A', 1, 1 };
void sigintr_handler (int signum) {
exit (0);
}
int main (void) {
SaAmfHandleT handle;
int result;
@ -239,6 +246,8 @@ int main (void) {
fd_set read_fds;
SaNameT compName;
signal (SIGINT, sigintr_handler);
result = saAmfInitialize (&handle, &amfCallbacks, &version);
if (result != SA_OK) {
printf ("initialize result is %d\n", result);

View File

@ -35,6 +35,8 @@
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <signal.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
@ -233,6 +235,10 @@ SaAmfCallbacksT amfCallbacks = {
SaVersionT version = { 'A', 1, 1 };
void sigintr_handler (int signum) {
exit (0);
}
int main (void) {
SaAmfHandleT handle;
int result;
@ -240,6 +246,7 @@ int main (void) {
fd_set read_fds;
SaNameT compName;
signal (SIGINT, sigintr_handler);
result = saAmfInitialize (&handle, &amfCallbacks, &version);
if (result != SA_OK) {
printf ("initialize result is %d\n", result);

View File

@ -35,6 +35,8 @@
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <signal.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
@ -234,6 +236,10 @@ SaAmfCallbacksT amfCallbacks = {
SaVersionT version = { 'A', 1, 1 };
void sigintr_handler (int signum) {
exit (0);
}
int main (void) {
SaAmfHandleT handle;
int result;
@ -241,6 +247,8 @@ int main (void) {
fd_set read_fds;
SaNameT compName;
signal (SIGINT, sigintr_handler);
result = saAmfInitialize (&handle, &amfCallbacks, &version);
if (result != SA_OK) {
printf ("initialize result is %d\n", result);

View File

@ -35,6 +35,8 @@
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <signal.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/select.h>
@ -133,6 +135,10 @@ SaClmCallbacksT callbacks = {
SaVersionT version = { 'A', 1, 1 };
void sigintr_handler (int signum) {
exit (0);
}
int main (void) {
SaClmHandleT handle;
fd_set read_fds;
@ -140,6 +146,8 @@ int main (void) {
int result;
SaClmClusterNotificationT clusterNotificationBuffer[64];
signal (SIGINT, sigintr_handler);
result = saClmInitialize (&handle, &callbacks, &version);
if (result != SA_OK) {
printf ("Could not initialize Cluster Membership API instance error %d\n", result);