LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-30-2005, 08:45 PM   #1
lucky6969b
Member
 
Registered: Nov 2005
Posts: 337

Rep: Reputation: 30
RS232 programming (sigaction problem)


Hi there,
I've got an application on hand. This app involves a structure called sigaction
But when I set this variable in C++ mode, I've got the following error

unittest.cpp: In function 'int main(int, char**)':
unittest.cpp:73: error: no match for 'operator=' in 'saio.sigaction::sa_mask = 0'
/usr/include/bits/sigset.h:31: note: candidates are: __sigset_t& __sigset_t:perator=(const __sigset_t&)

Code snippnet
.....
saig.sa_mask = 0;
....
etc

Thanks
Jack
 
Old 11-30-2005, 09:08 PM   #2
lucky6969b
Member
 
Registered: Nov 2005
Posts: 337

Original Poster
Rep: Reputation: 30
Sorry, this is a network program. But I just dropped it in the wrong place
Thanks
Jack
 
Old 04-05-2008, 02:06 PM   #3
Koteck
LQ Newbie
 
Registered: Apr 2008
Posts: 1

Rep: Reputation: 0
I've got this error when compiling the following example code:


void signal_handler_IO(int status)
{
...
}
...
void main()
{
struct sigaction saio;
...
saio.sa_handler = signal_handler_IO;
saio.sa_mask = 0; // problematic instruction
saio.flags = 0;
...
}


the solution is to replace:
saio.sa_mask = 0;
by:
sigemptyset(&(saio.sa_mask));


it seems to be a low-level implementation problem of the struct sigaction which internally manages 'unions' and differs from one platform to another
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
RS232 + Networking Programming lucky6969b Linux - Networking 5 11-29-2005 07:16 PM
USB>RS232 versus PCMCIA>RS232 jayhel Linux - Laptop and Netbook 2 08-04-2005 06:09 PM
Should I use signal() or sigaction()? .... grupoapunte Programming 2 06-04-2005 11:46 PM
i have a problem writting to my rs232 krisi Programming 14 12-22-2004 11:00 AM
Serial RS232 problem Onyx^ Linux - Hardware 6 09-09-2004 11:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration