473,320 Members | 1,846 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

signals

The C++ language doesn't deal with signals (i.e. SIGINT, SIGKILL), right?

Joe
Apr 4 '06 #1
4 1685
Right, signals are OS level semantics. C++ standard does not say
anything about signals. Closest thing which I can think of is
exceptions. But then, those are different then signals.

However, this does not mean that you cannot use signals in C++. You can
include <signal.h> and then use signal system call to specify signal
handler and signal type.

Tejas Kokje

Apr 4 '06 #2
Tejas Kokje wrote:
However, this does not mean that you cannot use signals in C++. You can
include <signal.h> and then use signal system call to specify signal
handler and signal type.


Are you POSIX-tive about that?

;-)

--
Phlip
http://www.greencheese.org/ZeekLand <-- NOT a blog!!!
Apr 4 '06 #3
Joe Van Dyk wrote:
The C++ language doesn't deal with signals (i.e. SIGINT, SIGKILL), right?


It does, in the standard header <csignal>. SIGINT, SIGTERM etc are
standard macros.
However the conditions under which these signals are delivered are not
specified, except when you raise them yourself with the "raise"
function.

IIRC, Windows will never deliver these signals unless you raise them
manually, but POSIX systems will.

Apr 4 '06 #4
Joe Van Dyk <jo********@boeing.com> writes:
The C++ language doesn't deal with signals (i.e. SIGINT, SIGKILL), right?


Wrong.

Section 17.3.1.2 mentions the header <csignal>, and says the following:

Except as noted in Clauses 18 through 27, the contents of each header cname
shall be the same as that of the corresponding header name.h, as specified
in ISO/IEC 9899:1990 Programming Languages C (Clause 7), or ISO/IEC:1990
Programming Languages?C AMENDMENT 1: C Integrity, (Clause 7), as
appropriate, as if by inclusion.

I.e., it deals with signals with the same extent as the C language.
E.g. it says something about SIGINT, but nothing about SIGKILL.

ImRe
Apr 5 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Holger Joukl | last post by:
Hi, migrating from good old python 1.5.2 to python 2.3, I have a problem running a program that features some threads which execute calls to an extension module. Problem is that all of a sudden,...
1
by: Isidro Vila Verde | last post by:
Greetings, I need to handle signals to close some excel applications that my script open, when the script is killed by another process. My script is a little bit complex, but I wrote just two ...
4
by: Gabriele Bartolini | last post by:
Hi, I am writing an application in C++ on Linux, using threads (this is my first experience with pthreads). The application itself is fine, it is just that I wanted to handle asynchronous...
1
by: Leo Kirch | last post by:
Hello XSLT gurus, i've got a rather difficult problem. Some explanations first. theres a signal oriented xml-file - the graphical represantation looks like: | startsignal (signal00) \...
4
by: maxmagna | last post by:
Hello, I am looking for material that describes how *precisely* UNIX-based signals interact with the normal C++ execution flow of control and guidelines on how to treat signals in an...
11
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.
0
by: Arnaud Debaene | last post by:
Hello all. I've got a bunch of existing, non managed, C++ DLLs that export types with, among other things, public events implemented using the boost::signals library. Now, I need to have...
11
by: vippstar | last post by:
What is the purpose of signals and why do they exist in C? thanks in advance
2
by: wongjoekmeu | last post by:
Dear All, I have some a program in which I link a static library. The static library has a initialize() and uninitialized() function. Now when I call the initialize function a thread is being...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.