diff -urN multipath-tools-0.1.1/multipathd/Makefile multipath-tools-0.1.2/multipathd/Makefile --- multipath-tools-0.1.1/multipathd/Makefile 2004-03-06 19:26:48.000000000 +0100 +++ multipath-tools-0.1.2/multipathd/Makefile 2004-03-12 11:24:55.000000000 +0100 @@ -7,7 +7,7 @@ mandir = /usr/share/man/man8 rcdir = /etc/init.d -CFLAGS = -pipe -g -O2 -Wall -Wunused -Wstrict-prototypes -DDEBUG=1 +CFLAGS = -pipe -g -O2 -Wall -Wunused -Wstrict-prototypes -DDEBUG=1 -DFLOATING_STACKS LDFLAGS = -lpthread -ldevmapper -lsysfs OBJS = main.o devinfo.o checkers.o diff -urN multipath-tools-0.1.1/multipathd/main.c multipath-tools-0.1.2/multipathd/main.c --- multipath-tools-0.1.1/multipathd/main.c 2004-03-07 00:37:29.000000000 +0100 +++ multipath-tools-0.1.2/multipathd/main.c 2004-03-12 11:51:46.000000000 +0100 @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include @@ -435,6 +436,7 @@ struct paths *failedpaths; struct devmap *devmaps, *devmaps_p; struct event_thread *waiters, *waiters_p; + pthread_attr_t attr; int r; /* inits */ @@ -442,6 +444,8 @@ devmaps = malloc (MAXMAPS * sizeof (struct devmap)); waiters = malloc (MAXMAPS * sizeof (struct event_thread)); memset (waiters, 0, MAXMAPS * sizeof (struct event_thread)); + pthread_attr_init (&attr); + pthread_attr_setstacksize (&attr, 32 * 1024); while (1) { @@ -487,7 +491,8 @@ } LOG (1, "[event thread] create event thread for %s", waiters_p->mapname); - pthread_create (waiters_p->thread, NULL, waitevent, waiters_p); + pthread_create (waiters_p->thread, &attr, waitevent, waiters_p); + pthread_detach (*waiters_p->thread); out: waiters_p = waiters; devmaps_p++; @@ -643,6 +648,7 @@ int main (int argc, char *argv[]) { pthread_t wait, check; + pthread_attr_t attr; struct paths *failedpaths; pid_t pid; @@ -664,9 +670,12 @@ signal_init (); failedpaths = initpaths (); + + pthread_attr_init (&attr); + pthread_attr_setstacksize (&attr, 64 * 1024); - pthread_create (&wait, NULL, waiterloop, failedpaths); - pthread_create (&check, NULL, checkerloop, failedpaths); + pthread_create (&wait, &attr, waiterloop, failedpaths); + pthread_create (&check, &attr, checkerloop, failedpaths); pthread_join (wait, NULL); pthread_join (check, NULL);