if (pthread_attr_setstacksize(&pthAttr, STACK_SIZE))
SOFT_ERROR(PI_INIT_FAILED, "pthread_attr_setstacksize failed (%m)");
- if (pthread_create(&pthAlert, &pthAttr, pthAlertThread, &i))
- SOFT_ERROR(PI_INIT_FAILED, "pthread_create alert failed (%m)");
+ if (!(gpioCfg.ifFlags & PI_DISABLE_ALERT))
+ {
+ if (pthread_create(&pthAlert, &pthAttr, pthAlertThread, &i))
+ SOFT_ERROR(PI_INIT_FAILED, "pthread_create alert failed (%m)");
- pthAlertRunning = 1;
+ pthAlertRunning = 1;
+ }
if (!(gpioCfg.ifFlags & PI_DISABLE_FIFO_IF))
{
#define PI_DISABLE_FIFO_IF 1
#define PI_DISABLE_SOCK_IF 2
#define PI_LOCALHOST_SOCK_IF 4
+#define PI_DISABLE_ALERT 8
/* memAllocMode */
ifFlags |= PI_LOCALHOST_SOCK_IF;
break;
+ case 'm':
+ ifFlags |= PI_DISABLE_ALERT;
+ break;
+
case 'n':
addr = checkAddr(optarg);
if (addr && (numSockNetAddr<MAX_CONNECT_ADDRESSES))