Sponsored Content
Full Discussion: pthreads invoking atexit()
Top Forums Programming pthreads invoking atexit() Post 23940 by andrewl68 on Tuesday 2nd of July 2002 02:51:14 PM
Old 07-02-2002
pthreads invoking atexit()

I am trying to integrate a PRO*C mutlithreaded application. The application is invoking the atexit() function immediatly after executing the second sql function. I have set the thread attribute stack size to a larger amount. Does anyone have any other ideas on what would cause this.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

PThreads

Can anyone explain me how to use pthread_key_create() , pthread_setspecific(), pthread_getspecific() and pthread_key_delete () routines in pthreads. Kindly state by an example. (3 Replies)
Discussion started by: S.P.Prasad
3 Replies

2. Programming

pthreads

Does any one no of some good web site which will explain about how to program using pthreads in a UNIX enviroment? (6 Replies)
Discussion started by: fishman2001
6 Replies

3. Programming

pthreads

howcome that pthtreads spawn 2 extra processes? I'm kind of new with pthreads but fork() did not act like this. Anyone who can give me a technical explanation of what happends with mother / daughter processes? Best regards Esaia. (2 Replies)
Discussion started by: Esaia
2 Replies

4. Programming

PThreads

I have created a thread program, it is attached. My problem is that I need to loop this program multiple times, and basically reset everything including the threads created previously. I try to loop the program, the first run is fine, as always, but the second run of the program, the initialize... (0 Replies)
Discussion started by: justgotthis
0 Replies

5. Programming

Behavior of pthreads

Hi All, I ve written a small program to get started off with pthreads. I somehow feel the program doesnt meet the purpose. Please find the code and the output below. Please find my question at the bottom. #include <pthread.h> #include <stdio.h> #include <stdlib.h> void *PrintThread1(void... (4 Replies)
Discussion started by: nhrraj
4 Replies

6. UNIX for Dummies Questions & Answers

Question on Pthreads

How to give superuser privileges while setting the attributes like pthread_attr_setschedpolicy( )?? Even with normal user mode ,it is working fine for me.But in man pages, they have specied that to set the scheduling policy as SCHED_FIFO, the process should have superuser privileges. (0 Replies)
Discussion started by: yashavant.a
0 Replies

7. HP-UX

pthreads

Hi! I'm linking my hpux code using -lpthread (gcc), yet it references libpthread_tr.1, the debug version of the pthread lib. How do I force it to use pthreads? Thanks, :) (3 Replies)
Discussion started by: zackz
3 Replies

8. Programming

Problem with pthreads

hi i have a code: I found that after exiting from child thread memory isn't freed. I commented everything which is "some actions" here, so thread's function contains only two lines. But it doesn't help. What do I do wrong? Thanks a lot (3 Replies)
Discussion started by: sery0ga
3 Replies

9. Programming

MultiThreading using Pthreads

Situation: i have multiple pthread_create calls like this: pthread_create(...., ThreadFunc1,.....); pthread_create(...., ThreadFunc2,.....); . . which i am using to create multiple threads.All the "ThreadFunc<i>" functions are actually calling same function "Receive" of a class using same... (3 Replies)
Discussion started by: Sastra
3 Replies

10. Programming

Idleness with pthreads

Hello, I am writing a threaded program using the pthread library in linux. I have a master thread that needs to control worker threads, in particular, it has to be able to ensure that none of the worker threads will be running for a specified amount of time, even if the worker threads are... (7 Replies)
Discussion started by: andres625
7 Replies
PTHREAD_ATTR_SETSTACKSIZE(3)				     Linux Programmer's Manual				      PTHREAD_ATTR_SETSTACKSIZE(3)

NAME
pthread_attr_setstacksize, pthread_attr_getstacksize - set/get stack size attribute in thread attributes object SYNOPSIS
#include <pthread.h> int pthread_attr_setstacksize(pthread_attr_t *attr, size_t stacksize); int pthread_attr_getstacksize(pthread_attr_t *attr, size_t *stacksize); Compile and link with -pthread. DESCRIPTION
The pthread_attr_setstacksize() function sets the stack size attribute of the thread attributes object referred to by attr to the value specified in stacksize. The stack size attribute determines the minimum size (in bytes) that will be allocated for threads created using the thread attributes object attr. The pthread_attr_getstacksize() function returns the stack size attribute of the thread attributes object referred to by attr in the buffer pointed to by stacksize. RETURN VALUE
On success, these functions return 0; on error, they return a nonzero error number. ERRORS
pthread_attr_setstacksize() can fail with the following error: EINVAL The stack size is less than PTHREAD_STACK_MIN (16384) bytes. On some systems, pthread_attr_setstacksize() can fail with the error EINVAL if stacksize is not a multiple of the system page size. VERSIONS
These functions are provided by glibc since version 2.1. CONFORMING TO
POSIX.1-2001. NOTES
For details on the default stack size of new threads, see pthread_create(3). A thread's stack size is fixed at the time of thread creation. Only the main thread can dynamically grow its stack. The pthread_attr_setstack(3) function allows an application to set both the size and location of a caller-allocated stack that is to be used by a thread. BUGS
As at glibc 2.8, if the specified stacksize is not a multiple of STACK_ALIGN (16 bytes on most architectures), it may be rounded downward, in violation of POSIX.1-2001, which says that the allocated stack will be at least stacksize bytes. EXAMPLE
See pthread_create(3). SEE ALSO
getrlimit(2), pthread_attr_init(3), pthread_attr_setguardsize(3), pthread_attr_setstack(3), pthread_create(3), pthreads(7) COLOPHON
This page is part of release 3.53 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. Linux 2012-03-15 PTHREAD_ATTR_SETSTACKSIZE(3)
All times are GMT -4. The time now is 11:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy