diff options
author | Erik Troan <ewt@redhat.com> | 2000-02-23 21:04:50 +0000 |
---|---|---|
committer | Erik Troan <ewt@redhat.com> | 2000-02-23 21:04:50 +0000 |
commit | 9118274a4e9df2a574cecc169e5fbca4dc98d2f9 (patch) | |
tree | b5c9aa7b945a00eab9659d8e81089da31c630af0 /loader | |
parent | 51f5a9e60eea5c47de006440b23e33a996fff3dd (diff) | |
download | anaconda-9118274a4e9df2a574cecc169e5fbca4dc98d2f9.tar.gz anaconda-9118274a4e9df2a574cecc169e5fbca4dc98d2f9.tar.xz anaconda-9118274a4e9df2a574cecc169e5fbca4dc98d2f9.zip |
various changes to get better ^C, ^Z handling
Diffstat (limited to 'loader')
-rw-r--r-- | loader/init.c | 3 | ||||
-rw-r--r-- | loader/loader.c | 4 | ||||
-rw-r--r-- | loader/minilibc.h | 7 |
3 files changed, 14 insertions, 0 deletions
diff --git a/loader/init.c b/loader/init.c index 512e3b66b..20122569c 100644 --- a/loader/init.c +++ b/loader/init.c @@ -490,6 +490,9 @@ int main(int argc, char **argv) { } printf("done\n"); + signal(SIGINT, SIG_IGN); + signal(SIGTSTP, SIG_IGN); + for (i = 1; i < argc; i++) if (!strcmp (argv[i], "serial")) { isSerial = 1; diff --git a/loader/loader.c b/loader/loader.c index 9e99a581a..0514aba8c 100644 --- a/loader/loader.c +++ b/loader/loader.c @@ -32,6 +32,7 @@ #include <stdlib.h> #include <string.h> #include <sys/ioctl.h> +#include <sys/signal.h> #include <sys/socket.h> #include <sys/sysmacros.h> #include <sys/utsname.h> @@ -168,6 +169,9 @@ static void spawnShell(int flags) { logMessage("could not set new controlling tty"); } + signal(SIGINT, SIG_DFL); + signal(SIGTSTP, SIG_DFL); + setenv("LD_LIBRARY_PATH", "/lib:/usr/lib:/usr/X11R6/lib:/mnt/usr/lib:" "/mnt/sysimage/lib:/mnt/sysimage/usr/lib", 1); diff --git a/loader/minilibc.h b/loader/minilibc.h index e1307f9a9..d4a422f42 100644 --- a/loader/minilibc.h +++ b/loader/minilibc.h @@ -45,6 +45,8 @@ static inline _syscall2(int,symlink,const char *,a,const char *,b) static inline _syscall2(int,chmod,const char * ,path,mode_t,mode) static inline _syscall2(int,sethostname,const char *,name,int,len) static inline _syscall2(int,setdomainname,const char *,name,int,len) +static inline _syscall2(int,setpgid,int,name,int,len) +static inline _syscall2(int,signal,int,num,void *,len) static inline _syscall1(int,umount,const char *,dir) static inline _syscall1(int,unlink,const char *,fn) static inline _syscall1(int,close,int,fd) @@ -104,3 +106,8 @@ char * strchr(char * str, int ch); char * strncpy(char * dst, const char * src, int len); void printstr(char * string); + +#define SIGINT 2 +#define SIGTSTP 20 + +#define SIG_IGN ((void *) 1) |