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::operator=(const __sigset_t&) Code snippnet ..... saig.sa_mask = 0; .... etc Thanks Jack |
Sorry, this is a network program. But I just dropped it in the wrong place
Thanks Jack |
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 |
All times are GMT -5. The time now is 09:39 PM. |