Sponsored Content
Full Discussion: How come sigs don't work?
Contact Us Post Here to Contact Site Administrators and Moderators How come sigs don't work? Post 54611 by l008com on Thursday 19th of August 2004 09:41:30 AM
Old 08-19-2004
How come?
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Things in tutorials that don't work.

I am thankful for this site and for the many links provided. I have been going through one of the tutorials, but as I try some things, they don't seem to work. I am wondering if there is something I need first before being able to use a tutorial (like version number (HP-UX) or how I am getting... (1 Reply)
Discussion started by: arungavali
1 Replies

2. Programming

why printf() function don't go work?

I use FreeBSD,and use signal,like follows: signal(SIGHUP,sig_hup); signal(SIGIO,sig_io); when I run call following code,it can run,but I find a puzzled question,it should print some information,such as printf("execute main()") will print execute main(),but in fact,printf fuction print... (2 Replies)
Discussion started by: konvalo
2 Replies

3. Shell Programming and Scripting

Use variable in sed don't work.

Hi all. I have a script as below: cutmth=`TZ=CST+2160 date +%b` export cutmth echo $cutmth >> date.log sed -n "/$cutmth/$p" alert_sbdev1.log > alert_summ.log My purpose is to run through the alert_sbdev1.log and find the 1st occurence of 'Jan' and send everything after that line to... (4 Replies)
Discussion started by: ahSher
4 Replies

4. Programming

why daytime don't work?

Following code is detecting solaris daytime,when I run it,I can't get any result,code is follows: #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #define BUFFSIZE 150 int main(){ ... (2 Replies)
Discussion started by: konvalo
2 Replies

5. Programming

why printf don't work?

I use Solaris 10, I use following code: #include <signal.h> int main(void){ printf("----------testing-----------"); if(signal(SIGUSR1,sig_usr)==SIG_ERR) err_sys("can't catch SIGUSR1"); for(;;) pause(); sig_user(int signo){ ..... } when I run above code,it print nothing... (3 Replies)
Discussion started by: konvalo
3 Replies

6. HP-UX

awk don't work in hp-ux 11.11

Hello all! I have problem in hp-ux 11.11 in awk I want to grep sar -d 2 1 only 3 column, but have error in awk in hp-ux 11.11 Example: #echo 123 234 | awk '{print $2}' 123 234 The situattions in commands bdf | awk {print $5}' some... In hp-ux 11.31 - OK! How resolve problem (15 Replies)
Discussion started by: ostapv
15 Replies

7. Solaris

I don`t understand how It work (about startup script)?

Hi all. The startup script in /usr/local/bin. After user login the script run an application. Iwould in the same way run the another application. How to make It similar? Where I must to look? Regards. (3 Replies)
Discussion started by: wolfgang
3 Replies

8. Solaris

Open Terminal Don't work

Hi, I installed solaris 10 x86 on my local system. it was working fine. today when i started the system, it started up without any problem. when i tried to open the terminal it didn't open any terminal. Plz help me (0 Replies)
Discussion started by: malikshahid85
0 Replies

9. Shell Programming and Scripting

Equivalence classes don't work

Hello: I can't get equivalence classes to work in globs or when passing them to tr. If I understood correctly, matches e, é, è, ê, etc. But when using them with utilities like tr they don't work. Here's an example found in the POSIX standard: I decided to create the aforementioned files in... (9 Replies)
Discussion started by: Cacializ
9 Replies
ssignal(3)						     Library Functions Manual							ssignal(3)

NAME
ssignal, ssignal_r, gsignal, gsignal_r - Set and raise a software signal LIBRARY
Standard C Library (libc.a) SYNOPSIS
#include <signal.h> void *ssignal( int signal, void (*function)(int))) (int); int gsignal( int signal); The following functions are supported to maintain backward compatibility with previous versions of the operating system. void *ssignal_r( int signal, void (*function) (int), void (*sigs[])(int))) (int); int gsignal_r( int signal, void (*sigs[])(int)); PARAMETERS
Defines the signal. Specifies the action associated with the signal. Specifies the array of signal functions. This structure must have at least 21 entries, each of which must be initialized to 0 (zero) by the caller. DESCRIPTION
These functions are obsolete and are retained for compatibility with earlier versions of the operating system. The ssignal() and gsignal() functions implement a facility similar to that of the signal() function and the kill() system call. However, there is no connection between the two facilities. User programs can use the ssignal() and gsignal() functions to handle exception pro- cessing within an application. signal() and related functions handle system-defined exceptions. The signals available are associated with integers in the range 1 to 15. Other values are reserved for use by the C library and should not be used. The ssignal() function associates the procedure specified by the function parameter with the signal specified by the signal parameter. The gsignal() function raises the signal, causing the procedure specified by the function parameter to be taken. The function parameter is either a pointer to a user-defined function, or either of the constants SIG_DFL (default action) or SIG_IGN (ignore signal). The ssignal() function returns the procedure that was previously established for that signal. If no procedure was estab- lished before or if the signal number is illegal, then ssignal() returns the value SIG_DFL. The gsignal() function raises the signal specified by the signal parameter by performing the following: If the procedure for signal is SIG_DFL, the gsignal() function returns a value of 0 (zero) and takes no other action. If the procedure for signal is SIG_IGN, the gsig- nal() function returns a value of 1 and takes no other action. If the procedure for signal is a function, the function value is reset to SIG_DFL and the function is called with signal passed as its parameter. The gsignal() function returns the value returned by the calling function with a single integer argument, which is the value of signal. If the procedure for signal is illegal or if no procedure is speci- fied for that signal, gsignal() returns a value of 0 (zero) and takes no other action. NOTES
The ssignal_r() and gsignal_r() functions are the reentrant versions of the ssignal() and gsignal() functions. They are supported in order to maintain backward compatibility with previous versions of the operating system. Upon successful completion, the ssignal_r() and gsig- nal_r() functions place pointers in or retrieve pointers from the signal structure in sigs. RETURN VALUES
The ssignal() and ssignal_r() functions return the value of the previously installed function if there was one, or SIG_DFL if there was not a previously installed function. If the value of signal was illegal the ssignal() and ssignal_r() functions return SIG_DFL. The gsignal() and gsignal_r() functions return a value of 0 (zero) if the procedure for signal is illegal, or if SIG_DFL is the action for signal. The gsignal() and gsignal_r() functions return a value of 1 if the procedure for signal is SIG_IGN. If none of these are true, then the gsignal() and gsignal_r() functions return the value returned by the calling function. RELATED INFORMATION
Functions: kill(2), signal(2). delim off ssignal(3)
All times are GMT -4. The time now is 06:44 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy