mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-02 08:25:40 +02:00
Warn about broken pipes in filters instead of exiting abruptly
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include <sys/resource.h>
|
||||
#include <pthread.h>
|
||||
#include <getopt.h>
|
||||
#include <signal.h>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <set>
|
||||
@@ -2207,6 +2208,8 @@ int main(int argc, char **argv) {
|
||||
}
|
||||
}
|
||||
|
||||
signal(SIGPIPE, SIG_IGN);
|
||||
|
||||
files_open_at_start = open("/dev/null", O_RDONLY | O_CLOEXEC);
|
||||
if (files_open_at_start < 0) {
|
||||
perror("open /dev/null");
|
||||
|
||||
Reference in New Issue
Block a user