Revert init process changes.
This commit is contained in:
+5
-9
@@ -3,26 +3,22 @@
|
||||
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
|
||||
/// See LICENSE.md for details.
|
||||
|
||||
#include <sys/unistd.h>
|
||||
#include <sys/wait.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/unistd.h>
|
||||
#include <sys/wait.h>
|
||||
#include <time.h>
|
||||
|
||||
int main(int argc, char *argv[], char *envp[])
|
||||
{
|
||||
char *_argv[] = { "login", NULL };
|
||||
|
||||
int status;
|
||||
if (fork() == 0) {
|
||||
// execv("/bin/login", _argv);
|
||||
execv("/bin/tests/t_shmget", _argv);
|
||||
execv("/bin/login", _argv);
|
||||
printf("This is bad, I should not be here! EXEC NOT WORKING\n");
|
||||
}
|
||||
int status;
|
||||
#pragma clang diagnostic push
|
||||
#pragma ide diagnostic ignored "EndlessLoop"
|
||||
while (1) {
|
||||
wait(&status);
|
||||
}
|
||||
#pragma clang diagnostic pop
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user