Sponsored Content
Top Forums Programming Get the no. of threads spawned in a C program Post 302240297 by shamrock on Thursday 25th of September 2008 11:04:47 AM
Old 09-25-2008
Question Unclear

Do you want to know how many threads a process is allowed to create?
If that's the case then on AIX sysconf(_SC_THREAD_THREADS_MAX) will tell you the max number of threads allowed within a process.
 

10 More Discussions You Might Find Interesting

1. Linux

In unix how we can test or check race condition in c program by using multi threads

In unix how we can test or check race condition in any c program by using multi thread programming (1 Reply)
Discussion started by: afroze
1 Replies

2. UNIX for Dummies Questions & Answers

In unix how we can test or check race condition in a c program by using multi threads

In unix how we can test or check race condition in any c program by using multi thread programming (1 Reply)
Discussion started by: afroze
1 Replies

3. Programming

In unix how we can test or check race condition in c program by using multi threads

In unix how we can test or check race condition in any c program by using multi thread programming (5 Replies)
Discussion started by: afroze
5 Replies

4. Programming

In unix how we can test or check race condition in a c program by using multi threads

In unix how we can test or check race condition in any c program by using multi thread programming (1 Reply)
Discussion started by: afroze
1 Replies

5. UNIX for Dummies Questions & Answers

Finding apache process id that is spawned by a wget

Hi, I have a situation where I am writing a programme that runs a series of long running PHP scripts that can take anything from 20 minutes to 10 hours to execute. I have a solution half implemented where I use via php exec(wget <location to command>) and get the process id back. This... (1 Reply)
Discussion started by: mrploddy
1 Replies

6. Shell Programming and Scripting

Suppressing output of a spawned telnet process

Hi, I'm trying to spawn a telnet process and trying to do some actions in the remote host using expect script. I would like to know how to suppress all the output in order the user using the script should not be able to see any actions done on the remote host. I tried using the "log_user 0"... (8 Replies)
Discussion started by: arun_maffy
8 Replies

7. Shell Programming and Scripting

Preparing a list of spawned processes

Hi All I'm currently trying to develop a script which will find the child processes of a process ID already passed to the script. I then need the script to look for spawned processes of these child processes and so on until it can't find any more. For example At the moment, I have to... (6 Replies)
Discussion started by: huskie69
6 Replies

8. Shell Programming and Scripting

Process behavior different when spawned from single terminal

So this one just plain confuses me. I have a bunch of somewhat CPU intensive processes that all communicate using a shared memory region. Some of these programs are threaded and some also change the scheduling to FIFO or round robin. The good news is that everything works as long as I spawn... (3 Replies)
Discussion started by: talkingfennel
3 Replies

9. Shell Programming and Scripting

Storing received value from send, spawned telnet session

Hi Guys, I'm completely new to bash and trying to write a script to spawn a telnet session to retrieve the RSSI value of my device and log the average value of the RSSI over 20 samples. I know that my command does return the RSSI value successfully but my bash scripting is letting me down. I'm... (5 Replies)
Discussion started by: bwkm
5 Replies

10. Shell Programming and Scripting

ksh behavior in scripts spawned w/nohup

I have a need to run any number of identical scripts simultaneously, so I've created a driver script which reads a template script, edits these appropriately and then submits them via nohup. The spawned scripts all check to see at some point how many of their number are running and once the count... (7 Replies)
Discussion started by: safedba
7 Replies
td_ta_get_nthreads(3C_DB)				Threads Debugging Library Functions				 td_ta_get_nthreads(3C_DB)

NAME
td_ta_get_nthreads - gets the total number of threads in a process for libc_db SYNOPSIS
cc [ flag... ] file... -lc_db [ library... ] #include <proc_service.h> #include <thread_db.h> td_err_e td_ta_get_nthreads(const td_thragent_t *ta_p, int *nthread_p); DESCRIPTION
The td_ta_get_nthreads() function returns the total number of threads in process ta_p, including any system threads. System threads are those created by libc or libc_db on its own behalf. The number of threads is written into *nthread_p. RETURN VALUES
TD_OK The call completed successfully. TD_BADTA An invalid internal process handle was passed in. TD_BADPH There is a NULL external process handle associated with this internal process handle. TD_DBERR A call to one of the imported interface routines failed. TD_ERR The nthread_p argument was NULL, or a libc_db internal error occurred. ATTRIBUTES
See attributes(5) for description of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |MT-Level |Safe | +-----------------------------+-----------------------------+ SEE ALSO
libc_db(3LIB), attributes(5), threads(5) SunOS 5.10 20 Oct 1998 td_ta_get_nthreads(3C_DB)
All times are GMT -4. The time now is 02:37 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy