Is there a cross-platform C signal library available (better, open source)?

I recently worked on a project in which I need to port some of the Linux C code to Windows. The code uses the Linux signal mechanism (I mean "sigaction", "sigprocmast", etc.), which is poorly supported on Windows.

Is there a C / C ++ library that implements a cross-platform signal mechanism (preferably open)? Currently, I just need a library to support Linux and Windows >.

I think this question will make sense to you , because one day you may be asked a similar task.

One of my colleagues told me that ACE is a powerful library that perfectly implements the cross-platform signal mechanism, but he said that it is a huge library and will really take some time to study it. My project does not give me too much time, so I'm trying to find a lightweight and easy-to-learn library of signals. (Hmm .. well, if the libraries you know are all pretty big, please also tell me. :-)

I did a lot of research on this topic with Google, but I could not find what I want. Here is what I have done so far :

  • Search at Stackoverflow.com. People asked a lot of details about how to use signals in Linux, but no one asked about the implementation of a cross-platform signal.

  • Or, at Stackoverflow.com, people asked about a mechanism called a “signal slot”. I do not think this is what I need.

  • Google search. I tried the keywords "C-signal" cross-platform "OR cross-platform -game -python -gui -audio -digital -analysis -slot -image -processing -socket -time -directmedia", but could not find what I want to.

Please, help! Thank!

+5
source share
4 answers

You can try porting your library using cygwin. There are several applications that follow in the same way.

+1
source

. , . , , .

, - Linux Windows, pthread. , ! ! , API pthread_kill(signal) 0 (IIRC), (, ).

(, boost), /.

, , , . , , - , Linux, , , , " ".

, , ^^

, ^^

my2c

+3

, CYGWIN.

Windows , . Windows POSIX , . , , :)

+3

POSIX- Microsoft TechNet.

, , -, , Unix/Linux.

(. ), ...

CYGWIN MSYS MinGW.

(, , ) , .

0

All Articles