mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-02-20 19:02:23 +00:00
Add a signal handler to the client
This commit is contained in:
parent
2f095ec682
commit
60a2ca3eb9
5 changed files with 12 additions and 29 deletions
27
LICENSE
27
LICENSE
|
@ -4,7 +4,6 @@ copys for each license:
|
|||
|
||||
- Quake II: GPLv2
|
||||
- Info-ZIP (unzip): Info-ZIP License
|
||||
- libexecinfo: New BSD License
|
||||
|
||||
Parts of other Quake II Clients were included into the source. They
|
||||
covered by the same GPLv2 license as Quake II itself:
|
||||
|
@ -431,29 +430,3 @@ freely, subject to the above disclaimer and the following restrictions:
|
|||
|
||||
===============================================================================
|
||||
|
||||
Copyright (c) 2003 Maxim Sobolev <sobomax@FreeBSD.org>
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGE.
|
||||
|
||||
===============================================================================
|
||||
|
||||
|
|
6
Makefile
6
Makefile
|
@ -297,8 +297,9 @@ CLIENT_OBJS_ := \
|
|||
src/unix/hunk.o \
|
||||
src/unix/misc.o \
|
||||
src/unix/network.o \
|
||||
src/unix/signalhandler.o \
|
||||
src/unix/system.o \
|
||||
src/unix/vid.o
|
||||
src/unix/vid.o
|
||||
|
||||
# ----------
|
||||
|
||||
|
@ -342,8 +343,9 @@ SERVER_OBJS_ := \
|
|||
src/unix/hunk.o \
|
||||
src/unix/misc.o \
|
||||
src/unix/network.o \
|
||||
src/unix/signalhandler.o \
|
||||
src/unix/system.o
|
||||
|
||||
|
||||
# ----------
|
||||
|
||||
# Used by the OpenGL refresher
|
||||
|
|
|
@ -39,6 +39,8 @@
|
|||
#define BUILDSTRING "Linux"
|
||||
#elif defined __FreeBSD__
|
||||
#define BUILDSTRING "FreeBSD"
|
||||
#else
|
||||
#define BUILDSTRING "Unknown"
|
||||
#endif
|
||||
|
||||
#ifdef __i386__
|
||||
|
|
|
@ -41,5 +41,7 @@ typedef struct in_state
|
|||
int *in_speed_state;
|
||||
} in_state_t;
|
||||
|
||||
void registerHandler(void);
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include <unistd.h>
|
||||
|
||||
#include "../common/header/common.h"
|
||||
#include "header/unix.h"
|
||||
|
||||
cvar_t *nostdout;
|
||||
uid_t saved_euid;
|
||||
|
@ -54,6 +55,9 @@ main ( int argc, char **argv )
|
|||
{
|
||||
int time, oldtime, newtime;
|
||||
|
||||
/* register signal handler */
|
||||
registerHandler();
|
||||
|
||||
/* go back to real user for config loads */
|
||||
saved_euid = geteuid();
|
||||
seteuid( getuid() );
|
||||
|
|
Loading…
Reference in a new issue