What is the replace of system call sigblock on sunOS 5.10


 
Thread Tools Search this Thread
Operating Systems Solaris What is the replace of system call sigblock on sunOS 5.10
# 1  
Old 09-03-2010
Error 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
# 2  
Old 09-03-2010
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 07:04 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

System call oddity

Hi all, I'm trying to use bash to create a basic parser for some text, because basic grep/sed/awk have all my needs covered. So, I'm creating the chain of grep/sed I need and trying the execute that on the data I gather. The problem is, it's not working as it does when hardcoded. e.g. ... (3 Replies)
Discussion started by: beomagi
3 Replies

2. UNIX Desktop Questions & Answers

Licenses of SunOS 4.1.4 and System V R4

Does anyone know about the license of System V Release 4 & SunOS 4.1.4 source codes? I have found them online in some archives but I am not sure if I am 'supposed' to download them (not sure if it is legal) Can anyone tell me? EDIT: A little bit wrong category. Please move it. (1 Reply)
Discussion started by: anapplegeek
1 Replies

3. Shell Programming and Scripting

system call

Trying to figure out a load issue with a webserver. I have traced a php script and noticed the following connect(4, {sa_family=AF_INET, sin_port=htons(3306), sin_addr=inet_addr("XX.XX.XX.XX")}, 16) = -1 EINPROGRESS (Operation now in progress) <0.000035> poll(, 1, 2000) = 1 () <0.000120>... (5 Replies)
Discussion started by: rajan007
5 Replies

4. Programming

need help with system call

hi everyone i wrote a system call and compiled the kernel succesfully... my system call is in a file in the kernel folder named my_syscall1.c (kernel/my_syscall1.c) the header file for this system call i added it in the folder include like this include/my_syscall1/my_syscall1.h my problem is... (2 Replies)
Discussion started by: demis87
2 Replies

5. Programming

system call

I have a cgi script which is called after certain time interval, which has this: system ("ls -l /tmp/cgic* | grep -v \"cgicsave.env\" | awk '{print $5}'"); During the execution of this script,the output is 0 sometimes. But due to this the system call is not working at all and doesnt o/p... (2 Replies)
Discussion started by: xs2punit
2 Replies

6. Red Hat

Spacewalk. Problem with adding SunOS system

Hello i tryed add SunOS system to Spacewalk and see this error: # cat /etc/release Solaris 10 10/08 s10s_u6wos_07b SPARC Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms. ... (1 Reply)
Discussion started by: jess_t03
1 Replies

7. Programming

C:system call

Hi I'm studing the system call. I've written a small program that return the time spent in doing some operations. Now I'd like to write one that return the time spent in user mode of a process. I'm reading that i should use the tms struct: clock_t times(struct tms *buf); struct tms {... (2 Replies)
Discussion started by: Dedalus
2 Replies

8. Shell Programming and Scripting

system call

Hi, How to write a system calls in a script ? > cd $HOME > ls -ltr thanks in advance.. (10 Replies)
Discussion started by: hegdeshashi
10 Replies

9. Programming

c system call

How the c compiler differentiates the system calls and function calls? (1 Reply)
Discussion started by: rangaswamy
1 Replies

10. UNIX for Advanced & Expert Users

how to differentiate system call from library call

Hi, Ho do I differentiate system call from library call? for example if I am using chmod , how do I find out if it is a system call or library call? Thanks Muru (2 Replies)
Discussion started by: muru
2 Replies
Login or Register to Ask a Question