mini fixes

This commit is contained in:
Aliberk Sandıkçı 2023-07-26 14:16:15 +03:00
parent 572cc1931c
commit bc6a8d735a
Signed by: asandikci
GPG key ID: 25C67A03B5666BC1
5 changed files with 7 additions and 3 deletions

2
.gitignore vendored
View file

@ -77,4 +77,4 @@ Mkfile.old
dkms.conf
### USER MODIFIED ###
c-daemon/bin/
# c-daemon/bin/

View file

@ -9,12 +9,16 @@ This repo will be include two separate daemons. One of them is written with C la
<br>
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
```

BIN
c-daemon/bin/info Executable file

Binary file not shown.

BIN
c-daemon/bin/test Executable file

Binary file not shown.

View file

@ -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#