Lose nohup to toybox.
Change-Id: I2928534bc70c6c77cdc90b658029567f00e7f6ad
This commit is contained in:
parent
c0ac9313e9
commit
402f7e97d5
2 changed files with 0 additions and 27 deletions
|
@ -142,7 +142,6 @@ OUR_TOOLS := \
|
|||
nandread \
|
||||
netstat \
|
||||
newfs_msdos \
|
||||
nohup \
|
||||
notify \
|
||||
ps \
|
||||
readlink \
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int nohup_main(int argc, char *argv[])
|
||||
{
|
||||
if (argc < 2) {
|
||||
fprintf(stderr, "Usage: %s [-n] program args...\n", argv[0]);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
signal(SIGHUP, SIG_IGN);
|
||||
argv++;
|
||||
if (strcmp(argv[0], "-n") == 0) {
|
||||
argv++;
|
||||
signal(SIGINT, SIG_IGN);
|
||||
signal(SIGSTOP, SIG_IGN);
|
||||
signal(SIGTTIN, SIG_IGN);
|
||||
signal(SIGTTOU, SIG_IGN);
|
||||
signal(SIGQUIT, SIG_IGN);
|
||||
signal(SIGTERM, SIG_IGN);
|
||||
}
|
||||
execvp(argv[0], argv);
|
||||
perror(argv[0]);
|
||||
return EXIT_FAILURE;
|
||||
}
|
Loading…
Reference in a new issue