diff --git a/.gitignore b/.gitignore index 46343b1..3fd37fa 100644 --- a/.gitignore +++ b/.gitignore @@ -77,4 +77,4 @@ Mkfile.old dkms.conf ### USER MODIFIED ### -c-daemon/bin/ \ No newline at end of file +# c-daemon/bin/ \ No newline at end of file diff --git a/README.md b/README.md index 564d179..3bf8a0d 100644 --- a/README.md +++ b/README.md @@ -9,12 +9,16 @@ This repo will be include two separate daemons. One of them is written with C la
-How to start c-daemon + go processes: +How to **build** c-daemon + go processes: ```bash git clone https://git.aliberksandikci.com.tr/liderahenk/go-daemon cd go-daemon/ go build -o c-daemon/bin/ info gcc -o c-daemon/bin/test c-daemon/daemon/test.c c-daemon/daemon/daemon.c +``` + +How to **start** c-daemon + go processes: +```bash ./c-daemon/bin/test ``` diff --git a/c-daemon/bin/info b/c-daemon/bin/info new file mode 100755 index 0000000..bf79657 Binary files /dev/null and b/c-daemon/bin/info differ diff --git a/c-daemon/bin/test b/c-daemon/bin/test new file mode 100755 index 0000000..883ee86 Binary files /dev/null and b/c-daemon/bin/test differ diff --git a/c-daemon/daemon/daemon.c b/c-daemon/daemon/daemon.c index 095b6eb..dbc0a0b 100644 --- a/c-daemon/daemon/daemon.c +++ b/c-daemon/daemon/daemon.c @@ -37,7 +37,7 @@ int _daemon(int nochdir, int noclose){ // close(STDOUT_FILENO); // close(STDERR_FILENO); while (1) { - int status = system("../go-files/info"); + int status = system("./info"); // TODO SECURITY ISSUE // LINK https://stackoverflow.com/questions/5237482/how-do-i-execute-an-external-program-within-c-code-in-linux-with-arguments#