The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
Google UNIX.COM


High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Search attributes in one structure using the values from another structure dhanamurthy High Level Programming 3 03-27-2008 12:37 AM
MV files from one directory structure(multiple level) to other directory structure srmadab UNIX for Advanced & Expert Users 4 09-13-2006 01:01 PM
prob with ssh abzi Shell Programming and Scripting 1 01-24-2006 12:43 AM
Copying a Directory Structure to a new structure jhansrod UNIX for Dummies Questions & Answers 8 07-27-2005 03:24 AM
prob dreams5617 Shell Programming and Scripting 1 12-05-2004 12:31 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 02-21-2008
Registered User
 

Join Date: Nov 2007
Posts: 73
sigaction structure + compilation prob

For a program I am writing, Im using sigaction to catch and handle signals (i.e. SIGINT, SIGSTP) in my program.

Ive declared and initalised the corresponding sigaction structure as follows

Code:
struct sigaction event;
event.sa_handler = MySigHandler; /* The signal handling function */
event.sa_flags=0;
sigemptyset(&event.sa_mask);
sigaction(SIGINT,&event,NULL);
However when I compile the program, I get an error message saying storage size of 'event' (the sigaction structure) is unknown.

Im lost to know what the message means and how I could have possibly created the error. Help would be highly appreciated

cheers
Reply With Quote
Forum Sponsor
  #2  
Old 02-21-2008
Registered User
 

Join Date: Feb 2008
Posts: 82
I am not comfortable with signal progrraming. But looking at the error, i think you missed to include the header file, where sigaction structure is declared. Did you include signal.h in your code ?
Reply With Quote
  #3  
Old 02-24-2008
Registered User
 

Join Date: Nov 2007
Posts: 73
Quote:
Originally Posted by manikantants View Post
I am not comfortable with signal progrraming. But looking at the error, i think you missed to include the header file, where sigaction structure is declared. Did you include signal.h in your code ?
Sorry, I should have pointed out in my previous post the code I wrote down was only a portion of the entire program. Also to answer ur original question, yes I did include signal.h
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 05:19 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0