Visit The New, Modern Unix Linux Community

Linux and UNIX Man Pages

Test Your Knowledge in Computers #394
Difficulty: Medium
POSIX mandates 1024-byte default block sizes for the df and du utilities, reflecting the typical size of blocks on disks.
True or False?
Linux & Unix Commands - Search Man Pages

pthread_detach(3c) [sunos man page]

pthread_detach(3C)														pthread_detach(3C)

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(3T)														pthread_detach(3T)

pthread_detach() - mark a thread as detached to reclaim its resources when it terminates SYNOPSIS
thread Thread whose resources are to be reclaimed immediately when it terminates. DESCRIPTION
is used to detach the thread thread. When thread terminates, its resources will automatically be reclaimed by the system. If thread has already terminated, causes the resources of thread to be reclaimed by the system. does not cause thread to terminate. Once a detached thread has terminated, its resources, including the thread ID, may be reused by the system. The return status of a detached thread is lost when the thread terminates. Calling this function multiple times for the same thread results in undefined behavior. RETURN VALUE
Upon successful completion, returns zero. Otherwise, an error number is returned to indicate the error (the variable is not set). ERRORS
If any of the following occur, the function returns the corresponding error number: [EINVAL] thread does not refer to a joinable thread. [ESRCH] No thread could be found corresponding to thread. AUTHOR
was derived from the IEEE POSIX P1003.1c standard. SEE ALSO
pthread_create(3T), pthread_join(3T), wait(2). STANDARDS CONFORMANCE
Pthread Library pthread_detach(3T)

14 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Any backdoors?

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

Disabling thread deletion by OP?

. (8 Replies)
Discussion started by: Driver
8 Replies

3. Post Here to Contact Site Administrators and Moderators

how gollum answered..

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)
Discussion started by: sekar sundaram
5 Replies

4. What is on Your Mind?

Non Technical, really !!

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)
Discussion started by: linuxpenguin
13 Replies

5. Shell Programming and Scripting

More log manipulation

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

How to Delete a Post

Hi, I have created a new thread. I dont need that thread now. How should I delete it? Nobody has replied yet. Regd, M (5 Replies)
Discussion started by: mahatma
5 Replies

7. Shell Programming and Scripting

Cron Jobs for FTP download

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)
Discussion started by: moorthygs
5 Replies

8. Shell Programming and Scripting

Stripping out extensions when file has multiple dots in name

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

Can't post new thread

Hi, I've tried 3 times to post a new thread and for whatever reason it's not happening, hope you can help Thanks (11 Replies)
Discussion started by: saddlerken
11 Replies

10. UNIX for Advanced & Expert Users

Implementing thread in UNIX

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)
Discussion started by: jenanee
5 Replies

11. Shell Programming and Scripting

Problem in quitting/exiting from sqlplus

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)
Discussion started by: JuanPerez
11 Replies

12. UNIX for Beginners Questions & Answers

Finding and renaming files with exceptions

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)
Discussion started by: azurite
8 Replies

13. UNIX for Beginners Questions & Answers

Extract data between two parenthesi

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)
Discussion started by: raju2016
7 Replies

14. Emergency UNIX and Linux Support

How do i start a new thread with my android phone?

thanks (6 Replies)
Discussion started by: jgt
6 Replies

Featured Tech Videos