This source file includes following definitions.
- main
1
2
3
4
5
6
7
8 #include <stdio.h>
9 #include <stdlib.h>
10 #include <sys/types.h>
11 #include <sys/stat.h>
12 #include <fcntl.h>
13 #include <unistd.h>
14
15 int main(int argc, char* argv[])
16 {
17 unsigned char fifo_cmd = 1;
18 int fd;
19
20 if (1 > argc) {
21 fprintf(stderr, "usage: attach <full-path-to-debugger-fifo-file>\n");
22 exit(1);
23 }
24
25 fd = open(argv[1], O_WRONLY);
26 write(fd, &fifo_cmd, sizeof(unsigned char));
27 close(fd);
28
29 return 0;
30 }