Dmitry V. Levin | 4ff687b | 2015-07-27 10:02:33 +0000 | [diff] [blame] | 1 | #include <unistd.h> |
2 | |||||
3 | #define FILENAME "execve\nfilename" | ||||
4 | static const char * const argv[] = | ||||
5 | { FILENAME, "first", "second", NULL, NULL, NULL }; | ||||
6 | static const char * const envp[] = | ||||
7 | { "foobar=1", "foo\nbar=2", NULL , "", NULL , "", NULL, NULL}; | ||||
8 | |||||
9 | int | ||||
10 | main(void) | ||||
11 | { | ||||
12 | execve(FILENAME, (char * const *) argv, (char * const *) envp); | ||||
13 | return 0; | ||||
14 | } |