pthread_detach(3C)pthread_detach(3C)NAME
pthread_detach - detach a thread
SYNOPSIS
cc -mt [ flag... ] file... -lpthread [ library... ]
#include <pthread.h>
int pthread_detach(pthread_t thread);
The pthread_detach() function is used to indicate to the implementation that storage for the thread thread can be reclaimed when that
thread terminates. In other words, pthread_detach() dynamically resets the detachstate attribute of the thread to PTHREAD_CRE-
ATE_DETACHED. After a successful call to this function, it would not be necessary to reclaim the thread using pthread_join(). See
pthread_join(3C). If thread has not terminated, pthread_detach() will not cause it to terminate. The effect of multiple pthread_detach()
calls on the same target thread is unspecified.
If successful, pthread_detach() returns 0. Otherwise, an error number is returned to indicate the error.
The pthread_detach() function will fail if:
EINVAL The implementation has detected that the value specified by thread does not refer to a joinable thread.
ESRCH No thread could be found corresponding to that specified by the given thread ID.
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
pthread_create(3C), pthread_join(3C), attributes(5), standards(5)
23 Mar 2005 pthread_detach(3C)
Check Out this Related Man Page
PTHREAD_DETACH(3) BSD Library Functions Manual PTHREAD_DETACH(3)NAME
pthread_detach -- detach a thread
SYNOPSIS
#include <pthread.h>
int
pthread_detach(pthread_t thread);
DESCRIPTION
The pthread_detach() function is used to indicate to the implementation that storage for the thread thread can be reclaimed when the thread
terminates. If thread has not terminated, pthread_detach() will not cause it to terminate. The effect of multiple pthread_detach() calls on
the same target thread is unspecified.
RETURN VALUES
If successful, the pthread_detach() function will return zero. Otherwise an error number will be returned to indicate the error. Note that
the function does not change the value of errno as it did for some drafts of the standard. These early drafts also passed a pointer to
pthread_t as the argument. Beware!
ERRORS
The pthread_detach() function will fail if:
[EINVAL] The implementation has detected that the value specified by thread does not refer to a joinable thread.
[ESRCH] No thread could be found corresponding to that specified by the given thread ID, thread.
SEE ALSO pthread_join(3)STANDARDS
The pthread_detach() function conforms to ISO/IEC 9945-1:1996 (``POSIX.1'').
BSD April 4, 1996 BSD
Hello All:
I left an important file on my computer in Montana (I'm in Arizona). It is running Mac OS 10.2.7. For some reason it appears file sharing is off, I don't understand how that happened because I have logged in remotely before. Can someone please tell me if there is any way to use... (7 Replies)
Discussion started by: jellegard
7 Replies
2. Post Here to Contact Site Administrators and Moderators
Dear admins,
i remember, my first thread, it is regarding unix systems and i asked some suggestions...
and i like to know how gollum answered for that thread?..
and is gollum is a program?.. (5 Replies)
Hmm, Browsing the forums, bumped into this forum. And unfortunately and pitifully, there was just one thread telling what this forum is for and even more bad, there was another thread which was a technical question.
So you see, it probably only means guys on this forum just can "get away" (as neo... (13 Replies)
wasn't sure if this should have a new thread since I'm still working on the same job I asked a question about earlier. But it's a different problem/question so I guess it deserves a new thread....
I have a log with roughly 10000 lines in it, each one has a timestamp. The problem is, the time... (8 Replies)
Discussion started by: StevePace
8 Replies
6. Post Here to Contact Site Administrators and Moderators
Dear All,
Please to be inform you,I have posted one thread on this forum last 5 days back. I was not getting suggestions for my thread. So i am creating a new thread with detailed of my R&D.
I am new in Shell Scripts, Perl and Cron Jobs. I have one requirement in Cron jobs for FTP Download.... (5 Replies)
I posted this already in another thread, but was told that I should create a seperate thread for the following question:
How do I strip the extension when the delimiter might occur multiple times in the filename?
For example:
I have 2 files as input for my script.
test.extension... (8 Replies)
Discussion started by: Nemelis
8 Replies
9. Post Here to Contact Site Administrators and Moderators
Hi
For our load testing , we are using stubs (unix shell script) which send the response to the request coming from the application. As the unix stub is single threaded , it is responding to only one request whereas multiple requests come in parallely.
I haven't worked on thread concepts... (5 Replies)
Hello,
This is my first post and I would be very thankful if you can help me. I've already searched in the forum and I've found a very similar thread in wich my problem is solved, but the thread is closed and the solution given in it doesn't work in my shell:
153194-problem-quitting-sqlplus
... (11 Replies)
Hello all,
I am a new ubuntu user (have to use it for work) and I am trying to learn and familiarize myself with commands that I will be using frequently.
I would like some help in how I can get a list of all files with certain keywords in the filename.
For example, I have a directory... (8 Replies)
Thanks Ravinder for quick reply.Thats work.
One more thing if i want to extract something based on paranthesis....can you help.
Input:
exp1:
CREATE TABLE
(
A,
B,
C
)
o/p exp1:
A,
B,
C
exp2: (7 Replies)