01-16-2008
Never mind.
linger->l_linger is 0. The correct behavior is that close does not block in
this case and the connected client will get a RST. Data is discarded.
Can you try an experiment with this thread detached and don't call pthread_join()?
What's a backtrace on the blocked thread look like in gdb? What's your signal handling
look like?
<Edit> If this looks familiar you may be getting bit by a kernel bug:
Re: [PATCH -v2] fix for futex_wait signal stack corruption
Last edited by ramen_noodle; 01-16-2008 at 06:59 PM..
Reason: More info
10 More Discussions You Might Find Interesting
1. HP-UX
Hi, there
On HP-UX IA server, when calling 'accept' function in my program, the server never wait the client's connection. Each time, it accepted the request from IP address 0.0.0.0 even there is no client's connection. The server program looks like :
main()
{
.
.
.... (4 Replies)
Discussion started by: Frank2004
4 Replies
2. Shell Programming and Scripting
Hello,
I stop a process with kill -s SIGSTOP, but when I try to restart it with kill -s SIGCONT it do nothing.
I use Fedora Core 4.
Thank you a lot (1 Reply)
Discussion started by: Nene
1 Replies
3. Gentoo
HI,
I installed fedora core 6 on my inspiron 1501. After I boot it gives me the following error,
PCI: BIOS BUG #81(00000000) found. (1 Reply)
Discussion started by: linuxuser
1 Replies
4. Linux
hi all
i am currently using fedora core 3 . i downloaded the iso image of fedora core 6 but after installing the fedora core 6 . while starting linux it gives a error saying init is been killed .
wht is happened?
thank u (3 Replies)
Discussion started by: nageshrk
3 Replies
5. Linux
Problem about Fedora directory permission,can anyone help me?
In fedora,I have two ordinary user named user1&user2 in different
groups,when I logined user1 and created a dir named test/ in '/home/
user1/',and do 'chmod 750 test',so when 'ls -l',it appears 'drwxr-
x---' for 'test',but when I... (3 Replies)
Discussion started by: zhouq3132
3 Replies
6. Red Hat
Hi guys
i installed fedora 9 in my system.
i installed perl-devel rpm and perl-5.10.0 rpm.
But perlcc not in /usr/bin/ directory.But perl,perldoc binaris installed.
i am new one for linux. (3 Replies)
Discussion started by: viveksnv
3 Replies
7. SuSE
I appeal to all those of you that have experience with Fedora 9 for help. I am trying to install a suite of software which tries to make changes to the /etc/dhcpd.conf file. After the changes have been made the dhcpd service will not start and the original conf file is restored. However dhcpd... (1 Reply)
Discussion started by: johnf
1 Replies
8. Linux
Hi there, I'm having a bit of a strange problem which I would appreciate some help with.
The Problem:
I have two external hard drives, but I'm borrowing one off my parents to copy data too (one of mine, which is identical to theirs - WD MyBook 300g - is on its way out).
Fedora 9 recognizes... (3 Replies)
Discussion started by: lasthidingplace
3 Replies
9. Red Hat
Hi,
I am having booting issue with Fedora 11 x86_64 (64-bit version) on my laptop.
Laptop configuration is as below:
OS : Windows Vista Home Premium (64-bit)
Processor : Intel Core 2 Duo T6400 2.0 GHz
RAM : 4 GB
Tried following different way for installation:
1. Installed Fedora 11 on... (2 Replies)
Discussion started by: r2kv2k
2 Replies
10. Linux
Hello,
Can anyone please explain HOW Crontab i.e. job scheduling daemon works in Fedora and CentOS or any Linux platform(Ubuntu)....
What are the points that i have to take care of if have to include a script to be run at a specific scheduled time.
URGENT reply requested. Please help (1 Reply)
Discussion started by: Vabiosis
1 Replies
LEARN ABOUT MINIX
pthread_detach
PTHREAD_DETACH(3) Linux Programmer's Manual PTHREAD_DETACH(3)
NAME
pthread_detach - detach a thread
SYNOPSIS
#include <pthread.h>
int pthread_detach(pthread_t thread);
Compile and link with -pthread.
DESCRIPTION
The pthread_detach() function marks the thread identified by thread as detached. When a detached thread terminates, its resources are
automatically released back to the system without the need for another thread to join with the terminated thread.
Attempting to detach an already detached thread results in unspecified behavior.
RETURN VALUE
On success, pthread_detach() returns 0; on error, it returns an error number.
ERRORS
EINVAL thread is not a joinable thread.
ESRCH No thread with the ID thread could be found.
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
+-----------------+---------------+---------+
|Interface | Attribute | Value |
+-----------------+---------------+---------+
|pthread_detach() | Thread safety | MT-Safe |
+-----------------+---------------+---------+
CONFORMING TO
POSIX.1-2001, POSIX.1-2008.
NOTES
Once a thread has been detached, it can't be joined with pthread_join(3) or be made joinable again.
A new thread can be created in a detached state using pthread_attr_setdetachstate(3) to set the detached attribute of the attr argument of
pthread_create(3).
The detached attribute merely determines the behavior of the system when the thread terminates; it does not prevent the thread from being
terminated if the process terminates using exit(3) (or equivalently, if the main thread returns).
Either pthread_join(3) or pthread_detach() should be called for each thread that an application creates, so that system resources for the
thread can be released. (But note that the resources of any threads for which one of these actions has not been done will be freed when
the process terminates.)
EXAMPLE
The following statement detaches the calling thread:
pthread_detach(pthread_self());
SEE ALSO
pthread_attr_setdetachstate(3), pthread_cancel(3), pthread_create(3), pthread_exit(3), pthread_join(3), pthreads(7)
COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the
latest version of this page, can be found at https://www.kernel.org/doc/man-pages/.
Linux 2017-09-15 PTHREAD_DETACH(3)