Skip to content
Snippets Groups Projects
Commit ea4991ad authored by Moe Jette's avatar Moe Jette
Browse files

pthread_attr_setstacksize is corrupting memory.

parent a58d8820
No related branches found
No related tags found
No related merge requests found
...@@ -124,7 +124,7 @@ main(int ac, char **av) ...@@ -124,7 +124,7 @@ main(int ac, char **av)
job_t *job; job_t *job;
pthread_attr_t attr, ioattr; pthread_attr_t attr, ioattr;
struct sigaction action; struct sigaction action;
int n, i; int i;
bool old_job = false; bool old_job = false;
struct rlimit rlim; struct rlimit rlim;
...@@ -226,7 +226,10 @@ main(int ac, char **av) ...@@ -226,7 +226,10 @@ main(int ac, char **av)
} }
pthread_attr_init(&attr); pthread_attr_init(&attr);
#if 0
/* FIXME: THIS IS REPORTING NO ERROR BUT CORRUPTING MEMORY */
pthread_attr_setstacksize(&attr, 16384); pthread_attr_setstacksize(&attr, 16384);
#endif
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
/* spawn msg server thread */ /* spawn msg server thread */
...@@ -235,7 +238,10 @@ main(int ac, char **av) ...@@ -235,7 +238,10 @@ main(int ac, char **av)
debug("Started msg server thread (%d)\n", job->jtid); debug("Started msg server thread (%d)\n", job->jtid);
pthread_attr_init(&ioattr); pthread_attr_init(&ioattr);
#if 0
/* FIXME: THIS IS REPORTING NO ERROR BUT CORRUPTING MEMORY */
pthread_attr_setstacksize(&ioattr, 16384); pthread_attr_setstacksize(&ioattr, 16384);
#endif
/* spawn io server thread */ /* spawn io server thread */
if ((errno = pthread_create(&job->ioid, &ioattr, &io_thr, (void *) job))) if ((errno = pthread_create(&job->ioid, &ioattr, &io_thr, (void *) job)))
fatal("Unable to create io thread. %m\n"); fatal("Unable to create io thread. %m\n");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment