Last active
September 8, 2016 15:18
-
-
Save arges/e3027717057003f461a51ae15f01f290 to your computer and use it in GitHub Desktop.
env-daemon
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <syslog.h> | |
int main(int argc, char **argv, char **envp) | |
{ | |
char **env; | |
openlog("env-daemon", LOG_CONS | LOG_PID | LOG_NDELAY, LOG_ALERT); | |
syslog(LOG_INFO, "starting env-daemon\n"); | |
for (env = envp; *env != 0; env++) { | |
char *thisEnv = *env; | |
syslog(LOG_INFO, "%s\n", thisEnv); | |
} | |
closelog(); | |
while (1) { | |
;; | |
} | |
return (0); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
all: | |
gcc env.c -o env | |
install: | |
install env $(DESTDIR) | |
clean: | |
rm -f env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: env-daemon | |
version: 0 | |
summary: env-daemon | |
description: env-daemon | |
confinement: strict | |
grade: stable | |
apps: | |
env-daemon: | |
command: env | |
daemon: simple | |
parts: | |
env-daemon: | |
plugin: make | |
source: . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment