mirror of
https://github.com/bol-van/zapret.git
synced 2026-09-19 14:54:51 +09:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d437963452 |
@@ -219,6 +219,8 @@ bool resolver_init(int threads, int fd_signal_pipe)
|
|||||||
|
|
||||||
pthread_attr_t attr;
|
pthread_attr_t attr;
|
||||||
if (pthread_attr_init(&attr)) goto ex;
|
if (pthread_attr_init(&attr)) goto ex;
|
||||||
|
#ifndef __APPLE__
|
||||||
|
// somebody reported stack size crashes on macos
|
||||||
// set minimum thread stack size
|
// set minimum thread stack size
|
||||||
|
|
||||||
if (pthread_attr_setstacksize(&attr,PTHREAD_STACK_MIN>32768 ? PTHREAD_STACK_MIN : 32768))
|
if (pthread_attr_setstacksize(&attr,PTHREAD_STACK_MIN>32768 ? PTHREAD_STACK_MIN : 32768))
|
||||||
@@ -226,6 +228,7 @@ bool resolver_init(int threads, int fd_signal_pipe)
|
|||||||
pthread_attr_destroy(&attr);
|
pthread_attr_destroy(&attr);
|
||||||
goto ex;
|
goto ex;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
for(t=0, resolver.threads=threads ; t<threads ; t++)
|
for(t=0, resolver.threads=threads ; t<threads ; t++)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user