Go Back   The UNIX and Linux Forums > Operating Systems > Solaris
Search Forums:



Solaris The Solaris Operating System, usually known simply as Solaris, is a Unix-based operating system introduced by Sun Microsystems. The Solaris OS is now owned by Oracle.

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 09-03-2010
Registered User
 

Join Date: Sep 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Exclamation What is the replace of system call sigblock on sunOS 5.10

Hi:
I have some old code need to be compiled - which include a system call, the function name is: sigblock like:

.....
int holdnum = sigblock(sigmask(SIGCHLD));
....

but the compiler told me the sigblock cannot be found even I include signal.h. Looks like it is depricated - but I need to know which one is the current call to replace it? our current OS is sunOS 5.10.

Thanks for your help
Sean
Sponsored Links
    #2  
Old 09-03-2010
Moderator
 

Join Date: Aug 2005
Location: Saskatchewan
Posts: 12,191
Thanks: 232
Thanked 1,703 Times in 1,632 Posts
This functionality is now provided by sigprocmask, but it's not a direct replacement, there's a whole new API. To block a new signal you'd do:


Code:
sigset_t set, old;
sigemptyset(&set);
sigaddset(&set, SIGCHLD);
sigprocmask(SIG_BLOCK, &set, &oldset);

This also leaves the previous set of signal masks in old, roughly equivalent to sigblock's return value but no longer an integer.

Last edited by Corona688; 09-03-2010 at 06:04 PM..
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
system call xs2punit Programming 2 06-08-2010 02:05 PM
Spacewalk. Problem with adding SunOS system jess_t03 Red Hat 1 10-28-2009 11:01 PM
system call hegdeshashi Shell Programming and Scripting 10 06-16-2009 01:11 AM
c system call rangaswamy Programming 1 02-19-2008 12:53 PM
how to differentiate system call from library call muru UNIX for Advanced & Expert Users 2 07-19-2007 11:20 PM



All times are GMT -4. The time now is 05:35 AM.