ignore SIGPIPE from subprocesses spawned with reproc

This commit is contained in:
lqdev 2021-06-02 17:27:40 +02:00
parent 76f561a8b5
commit cffcb77726
2 changed files with 4 additions and 0 deletions

1
.gitignore vendored
View File

@ -8,3 +8,4 @@ subprojects/lua
subprojects/libagg
subprojects/reproc
lite
error.txt

View File

@ -12,6 +12,7 @@
#include <X11/Xlib.h>
#include <X11/Xatom.h>
#include <X11/Xresource.h>
#include <signal.h>
#elif __APPLE__
#include <mach-o/dyld.h>
#endif
@ -106,6 +107,8 @@ int main(int argc, char **argv) {
HINSTANCE lib = LoadLibrary("user32.dll");
int (*SetProcessDPIAware)() = (void*) GetProcAddress(lib, "SetProcessDPIAware");
SetProcessDPIAware();
#else
signal(SIGPIPE, SIG_IGN);
#endif
SDL_Init(SDL_INIT_VIDEO | SDL_INIT_EVENTS);