+ /* get state of ipc queue */
+ tspec.tv_sec = 0;
+ tspec.tv_nsec = 10000000; /* 10 millisec */
+ loop = 30;
+ while (loop--) {
+ retval = msgctl(msgid, IPC_STAT, &msg_queue);
+ if (retval == -1) {
+ dbg("error getting info on ipc queue");
+ goto exit;
+ }
+ if (msg_queue.msg_qnum == 0)
+ goto exit;
+ nanosleep(&tspec, NULL);
+ }
+
+ info("message is still in the ipc queue, starting daemon...");
+ retval = start_daemon();