Hullo all, as the subject says Does pthread emit a sigchld signal on
successful exit?
I have an app which starts a thread in response to a button press in a
GUI. I can't join the thread but I need to know when it completes. The
time it takes for the thread to complete is variable and I don't want
to have to poll the thread for completion. I would like to avoid having
to use condition variables, so I thought setting up a signal handler to
catch the SIGCHLD signal would be a neat solution, I've tried using
signal() and sigaction to associate my handler with the SIGCHLD signal
but the handler is never called. When I run the app in gdb, thread exit
messages are printed when ever a thread exits. How does gdb do it? Can
anyone give me a definitive answer to this? It feels like pthread
should be able to do this but I can't find any specific tutorial or
reference which says it does or doesn't. Help!
Chuckles ;) 2 2908
"chuckles" <ch************ **@gmail.com> writes: Hullo all, as the subject says Does pthread emit a sigchld signal on successful exit?
[...]
We don't know. Threads are not part of standard C.
Try comp.programmin g.threads.
--
Keith Thompson (The_Other_Keit h) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Elf M. Sternberg |
last post by:
I'm having a devil of a time with signal handling under BSD 4.4 with
Python and I was hoping that this might ring a bell with someone. Using
the Webware Application Server (a multi-threaded Python application), I
fork off a process to run independently and do some heavy-duty multi-
threaded I/O churning. The process is launched with os.spawnvp().
The user may, at any time, elect to terminate this process
before it reaches its end. I...
|
by: Ishwar Rattan |
last post by:
Here is a piece code (according to blurb on os.wait, the lower
order 7 bits of exit status of process should contain the signal
number of signal that terminated the process..) and signal number
should be 8 (SIGFPE), similar logic in C-code produces expected
result.
Any pointers?
-ishwar
----
|
by: steffen staehle |
last post by:
Hi,
I'm writing a server process which spawns child processes via fork
This server process should keep track of the number of children stil
running, do the necessary cleanup to avoid zombies, etc.
In the beginning I thought I had to use the POSIX module, using SigSet
SigAction, sigprocmask etc. for a rather paranoid approach.
Then I've rea
|
by: Martin McCormick |
last post by:
A C program contains several signal statements to remove a
lock file if the program gets killed:
/*Set up interrupt handler to catch ctrl-C so that lock file can be removed.*/
signal(SIGINT,crash);
signal(SIGBUS,crash);
signal(SIGSEGV,crash);
This part works. Those signals cause the "crash.c" module to
run and get rid of the lock. Is there a standard way to also print
|
by: Jackie |
last post by:
Hi everyone,
I'd like to know when and how signals are used (e.g. SIGFPE, SIGABRT,
SIGTERM, SIGSEGV, SIGINT)? Thank you so much.
| |
by: fran |
last post by:
Server: IBM XSERIES 225 (Intel Xeon CPU 2.40GHz 1GB RAM)
Operating System: Linux RedHat ES 2.1 kernel 2.4.9
Languaje: C++
Compiler: gcc 2.96
Libs: pthread
We are in need of your help in order to solve the folowing problem:
We´re working on a server side application that implements threads
(pthread under linux Red Hat ES 2.1 kernel 2.4.9). The problem seems
|
by: Gianluca |
last post by:
This is the simplified code I'm trying to generate:
ilg.DeclareLocal(typeof(int)); // define local integer
Label exit = ilg.DefineLabel(); // define "exit" label
ilg.Emit(OpCodes.Ldc_I4_0); // put 0 on the stack
ilg.Emit(OpCodes.Stloc_0); // set the local integer to 0
ilg.Emit(OpCodes.Ldloc_0); // load the local integer (0) on the stack
ilg.Emit(OpCodes.Ldc_I4_1); // load integer 1 on the stack
|
by: Luis Arvayo |
last post by:
Hi,
In c#, I need to dynamically create types at runtime that will consist of
the following:
- inherits from a given interface
- will have a constructor with an int argument
|
by: david |
last post by:
I'm developing a program that runs using an asyncore loop. Right now
I can adequately terminate it using Control-C, but as things get
refined I need a better way to stop it. I've developed another
program that executes it as a child process using popen2.Popen4(). I
was attempting to use signals to stop it (using os.kill()) but I keep
running into a problem where sending the signal causes an infinite
loop of printing the message...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |