This commit is contained in:
Aliberk Sandıkçı 2023-07-27 13:02:32 +03:00
parent dc45257deb
commit 2d47319c07
Signed by: asandikci
GPG key ID: 25C67A03B5666BC1

View file

@ -1,9 +1,24 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
#include <linux/fs.h>
#include <linux/limits.h>
#include <stdio.h>
int _daemon (int, int);
// int _daemon (int, int);
int main(){
_daemon(0, 0);
// _daemon(0, 0);
while (1) {
int status = system("/usr/lib/cdaemontmp/info");
// TODO SECURITY ISSUE
// LINK https://stackoverflow.com/questions/5237482/how-do-i-execute-an-external-program-within-c-code-in-linux-with-arguments#
sleep(1);
}
getchar();
return 0;
}