* Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <libltt/libltt.h>
#include <errno.h>
#include <stdio.h>
static char *channel_root = NULL;
static char *trace_root = NULL;
+static int sigio_received = 0;
+
void handler(int signo)
{
printf("signal %d received\n", signo);
+ sigio_received = 1;
}
sigaddset(&(act.sa_mask), SIGIO);
sigaction(SIGIO, &act, NULL);
+ sigio_received = 0;
+
pid = fork();
if(pid > 0) {
- //sleep(1);
/* parent */
- pause();
+ while(!sigio_received) pause();
/* Now the trace is created, go on and create the supplementary files... */
printf("Creating supplementary trace files\n");