- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Porting from IBM-AIX to HP-Unix
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2001 08:48 AM
02-15-2001 08:48 AM
I am porting a C system from AIX to HP-Unix. I just would like to know what is the corresponding signal in HP-Unix as opposed to SIGDANGER in IBM-AIX, which is used when System crash is imminent and page space is needed. I am not a computer-whiz, so a minimum input from your side would be most appreciated.
Thank you,
Raj.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2001 09:30 AM
02-15-2001 09:30 AM
SolutionI believe AIX is the only Unix that supports SIGDANGER. This signal is sent to all processes when the system is running out of page space. The default action is to ignore the signal. However, it sounds like your C app has defined a signal handler routine for it.
Really, the only way to port it to HP-UX, or any other Unix that doesn't support SIGDANGER, is to remove the signal handler routine and the corresponding signal() call.
-sam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2001 10:03 AM
02-15-2001 10:03 AM
Re: Porting from IBM-AIX to HP-Unix
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2001 11:05 AM
02-15-2001 11:05 AM
Re: Porting from IBM-AIX to HP-Unix
Thank u very much for getting me such an early reply. If u could spare some more time, i have one other doubt.
The sa_mask structure in AIX has two unsigned long variables, losigs and hisigs, whereas in HP-Unix sa_mask structure contains an array of 8 unsigned int sigset[8]. sa_mask structure is initialised before passing it to sigaction() function. Now that the system is put in HP, is it enough if i change the initialisation of losigs and hisigs with sigset[0]=0; It might be a very silly question but still if u could reply it would be very nice of u.
Thanks,
Raj.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2001 01:07 PM
02-15-2001 01:07 PM
Re: Porting from IBM-AIX to HP-Unix
It sounds like the application is creating an empty mask by doing something like...
struct sigaction action;
action.sa_mask.losigs = 0;
action.sa_mask.hisigs = 0;
As you've found, this isn't portable because sa_mask is supposed to be opaque. You're not supposed to fiddle directly with its members.
Instead, use the following functions to initialize and manipulate signal sets (sigset_t structures)...
int sigemptyset(sigset_t *set);
int sigfillset(sigset_t *set);
int sigaddset(sigset_t *set, int signo);
int sigdelset(sigset_t *set, int signo);
int sigismember(const sigset_t *set, int signo);
Just do a "man" on any of these. So, to initialize an empty sigset and pass to sigaction, you should do something like...
struct sigaction action;
sigemptyset(&action.sa_mask);
action.sa_flags = 0;
action.sa_handler = sighandler_func;
sigaction(SIGUSR1, &action, NULL);
If there are any signals that you want to block during execution of sighandler_func, add them to action.sa_mask with sigaddset before calling segaction.
good luck,
-sam