fix lttctl signal
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Mon, 25 Jul 2005 19:57:23 +0000 (19:57 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Mon, 25 Jul 2005 19:57:23 +0000 (19:57 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@970 04897980-b3bd-0310-b5e0-8ef037075253

ltt/branches/poly/doc/developer/ltt-experimental-rewrite.html
ltt/branches/poly/lttctl/lttctl.c

index f3d82989d826805ef3f59008d7a85752a10c2cfe..463ab96cbb3209ca8e2992a35b77ee2ae7d05fcb 100644 (file)
@@ -12,6 +12,7 @@ Fix the traps -> disable nested logging for now.<br>
 Use per cpu spinlock on trace list.<br>
 Finish the control module, libltt and lttctl : netlink interface<br>
 Finish integrating lttctl with lttd.<br>
+fix lttctl signal waiting : use a flag.<br>
 <br>
 <br>
 * TODO<br>
@@ -19,6 +20,7 @@ Add information in the buffer header : buffer size, etc etc...<br>
        -> this information is so small that we can repeat it. Makes flight recorder
        easier to decode.<br>
 Add trace start structure to facility channel.<br>
+fix genevent : take no lock if num traces active is 0.<br>
 <br>
 <br>
 <br>
index 1eeb1b1201adeb7b1fbca5c86653252b83a5d596..e4e2908e8df5ce12642742fbe974be5f225edafb 100644 (file)
@@ -32,9 +32,12 @@ static enum trace_ctl_op op = CTL_OP_NONE;
 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;
 }
 
 
@@ -220,12 +223,13 @@ int lttctl_daemon(struct lttctl_handle *handle, char *trace_name)
        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");
This page took 0.02461 seconds and 4 git commands to generate.