mirror of
https://github.com/marcan/takeover.sh
synced 2025-08-20 05:13:48 -07:00
Initial commit
This commit is contained in:
commit
ca1e75afc2
3 changed files with 191 additions and 0 deletions
21
fakeinit.c
Normal file
21
fakeinit.c
Normal file
|
@ -0,0 +1,21 @@
|
|||
#define _XOPEN_SOURCE 700
|
||||
#include <signal.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
sigset_t set;
|
||||
int status, i;
|
||||
|
||||
for (i = 0; i < 64; i++)
|
||||
close(i);
|
||||
|
||||
if (getpid() != 1) return 1;
|
||||
|
||||
sigfillset(&set);
|
||||
sigprocmask(SIG_BLOCK, &set, 0);
|
||||
|
||||
for (;;) wait(&status);
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue