ust: continue work
[ust.git] / ust / ust.c
index 1fb7d098c521da7d085d857e598deefeccacd802..015629481b8bbe5aadef0d35b02479b3cd310164 100644 (file)
--- a/ust/ust.c
+++ b/ust/ust.c
@@ -89,16 +89,20 @@ int send_message(pid_t pid, const char *msg)
                return 1;
        }
 
-       char buf[] = "print_markers\n";
+       char *buf;
+
+       asprintf(&buf, "%s\n", msg);
 
        signal_process(pid);
 
-       result = sendto(fd, buf, sizeof(buf), 0, (struct sockaddr *)&addr, sizeof(addr));
+       result = sendto(fd, buf, strlen(buf), 0, (struct sockaddr *)&addr, sizeof(addr));
        if(result == -1) {
                perror("sendto");
                return 1;
        }
 
+       free(buf);
+
 //     result = fd = open(sockfile, O_RDWR);
 //     if(result == -1 && errno == ENXIO) {
 //             fprintf(stderr, "signalling process\n");
This page took 0.02432 seconds and 4 git commands to generate.