2023-07-27 13:02:32 +03:00
|
|
|
#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>
|
2023-07-26 10:28:17 +03:00
|
|
|
#include <stdio.h>
|
|
|
|
|
2023-07-27 13:02:32 +03:00
|
|
|
// int _daemon (int, int);
|
2023-07-26 10:28:17 +03:00
|
|
|
|
|
|
|
int main(){
|
2023-07-27 13:02:32 +03:00
|
|
|
// _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);
|
|
|
|
}
|
2023-07-26 10:28:17 +03:00
|
|
|
getchar();
|
|
|
|
return 0;
|
|
|
|
}
|