mirror of https://github.com/OpenTTD/OpenTTD
(svn r2013) Always ignore SIGPIPE, not only when SDL is used (ShadowJK)
parent
3763ec7652
commit
cf43c7a0e6
2
sdl.c
2
sdl.c
|
@ -158,8 +158,6 @@ static const char *SdlOpen(uint32 x)
|
||||||
signal(SIGABRT, SdlAbort);
|
signal(SIGABRT, SdlAbort);
|
||||||
signal(SIGSEGV, SdlAbort);
|
signal(SIGSEGV, SdlAbort);
|
||||||
signal(SIGFPE, SdlAbort);
|
signal(SIGFPE, SdlAbort);
|
||||||
|
|
||||||
signal(SIGPIPE, SIG_IGN);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
2
unix.c
2
unix.c
|
@ -10,6 +10,7 @@
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
|
#include <signal.h>
|
||||||
|
|
||||||
#if defined(__linux__)
|
#if defined(__linux__)
|
||||||
#include <sys/statvfs.h>
|
#include <sys/statvfs.h>
|
||||||
|
@ -464,6 +465,7 @@ int CDECL main(int argc, char* argv[])
|
||||||
|
|
||||||
_random_seeds[0][1] = _random_seeds[0][0] = time(NULL);
|
_random_seeds[0][1] = _random_seeds[0][0] = time(NULL);
|
||||||
|
|
||||||
|
signal(SIGPIPE, SIG_IGN);
|
||||||
|
|
||||||
return ttd_main(argc, argv);
|
return ttd_main(argc, argv);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue