Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ipc::signal(3pm) [debian man page]

Signal(3pm)						User Contributed Perl Documentation					       Signal(3pm)

NAME
IPC::Signal - Utility functions dealing with signals SYNOPSIS
$number = sig_num $name; $name = sig_name $number; sig_translate_setup; $number = $Sig_num{$name}; $name = $Sig_name[$number]; DESCRIPTION
This module contains utility functions for dealing with signals. Nothing is exported by default. sig_num chopped-signal-name Returns the signal number of the signal whose name (sans "SIG") is chopped-signal-name, or undef if there is no such signal. This function is prototyped to take a single scalar argument. sig_name signal-number Returns the chopped signal name (like "HUP") of signal number signal-number, or undef if there is no such signal. This function is prototyped to take a single scalar argument. sig_translate_setup If you want to use the @Sig_name and %Sig_num variables directly you must call sig_translate_setup to initialize them. This isn't nec- essary if you only use the function interfaces sig_name() and sig_num(). This function is prototyped to take no arguments. %Sig_num A hash with chopped signal name keys (like "HUP") and integer signal number values. @Sig_name An array mapping signal numbers to chopped signal names (like "HUP"). AUTHOR
Roderick Schertler <roderick@argon.org> SEE ALSO
perl(1). perl v5.8.8 1998-12-28 Signal(3pm)

Check Out this Related Man Page

IO::Async::Signal(3pm)					User Contributed Perl Documentation				    IO::Async::Signal(3pm)

NAME
"IO::Async::Signal" - event callback on receipt of a POSIX signal SYNOPSIS
use IO::Async::Signal; use IO::Async::Loop; my $loop = IO::Async::Loop->new; my $signal = IO::Async::Signal->new( name => "HUP", on_receipt => sub { print "I caught SIGHUP "; }, ); $loop->add( $signal ); $loop->run; DESCRIPTION
This subclass of IO::Async::Notifier invokes its callback when a particular POSIX signal is received. Multiple objects can be added to a "Loop" that all watch for the same signal. The callback functions will all be invoked, in no particular order. EVENTS
The following events are invoked, either using subclass methods or CODE references in parameters: on_receipt Invoked when the signal is received. PARAMETERS
The following named parameters may be passed to "new" or "configure": name => STRING The name of the signal to watch. This should be a bare name like "TERM". Can only be given at construction time. on_receipt => CODE CODE reference for the "on_receipt" event. Once constructed, the "Signal" will need to be added to the "Loop" before it will work. AUTHOR
Paul Evans <leonerd@leonerd.org.uk> perl v5.14.2 2012-10-24 IO::Async::Signal(3pm)
Man Page

12 More Discussions You Might Find Interesting

1. Solaris

Sun Sol 5.1 Signal Values

Looking for a document that indicates the signal values and what they mean. Found this of AIX under /usr/include/sys/signal.h only Sun sol did not find same type of information. (3 Replies)
Discussion started by: Texan_BOB
3 Replies

2. UNIX for Dummies Questions & Answers

Alarm signal

Hi, when I execute a script on unix AIX, I've got an error message: "Execution: 85328 Signal d'alarme". If I edit this file with "vi", I ve got the same error after a while (about 1 minute). If I try with another user I still have the problem. But if I rename this file, no problem. My... (5 Replies)
Discussion started by: cgsteph
5 Replies

3. Programming

Signal Names

Hi everyone, Is there a variable or built in function in the Unix env. for me to obtain the name of a signal that is caught? As far as I understand only a numeric value of the signal is returned to the handler. For example: void handler (int signum) { ... (2 Replies)
Discussion started by: laila63
2 Replies

4. Programming

Signal Problem

I am using the signal function, and passing it a function named quit procedure...I get the following warning.... passing arg2 of signal from incompatible pointer type... void quit_procedure(void); //this is the way i define my prototype... signal(SIGINT, quit_procedure); Please guide... (5 Replies)
Discussion started by: jacques83
5 Replies

5. UNIX for Dummies Questions & Answers

My ps -ef|grep command results are chopped off

On our one HP-UX 11i box, we have some very long paths defined. When I want to check on our user processes running, the resulting paths are chopped off. /xyz/abc/123/......./server/b is really a process running in the ..../server/bin directory. Is this a terminal problem or buffer length... (1 Reply)
Discussion started by: bsp18974
1 Replies

6. UNIX for Advanced & Expert Users

Trapped Signal HUP

We encountered an issue in our project while using the Interix UNIX (SFU 3.5) and explained our query below. We would be happy if anybody helps us to troubleshoot the problem J In our code the trapping signal for all signals like HUP, INT, QUIT, ILL, TRAP, ABRT, EXCEPT, etc., is initialized in... (4 Replies)
Discussion started by: RAMESHPRABUDASS
4 Replies

7. Programming

Signal Handling and Context Switches

Hi guys, this is my first posting, so at first hi to everyone! ;) I have a problem with ucontext_t in connection with signal handling. I want to simulate a preemptive scheduler. I am using the iTimer with ITIMER_PROF, to schedule the interrupts. You find the code below: #include <stdio.h>... (18 Replies)
Discussion started by: XComp
18 Replies

8. UNIX for Advanced & Expert Users

Trailing spaces chopped off - MF to Unix FTP.

We receive fixed width ASCII (not EBCIDIC) file from MF to UNIX server. We have trailing spaces in the file. What happens during FTP transmission, those trailing spaces gets chopped off. Is there any option in FTP when to transfer file from mainframes to unix not to chop off those spaces? (14 Replies)
Discussion started by: videsh77
14 Replies

9. Programming

Signal handling

I am trying to write a small program where I can send signals and then ask for an action to be triggered if that signal is received. For example, here is an example where I am trying to write a programme that will say you pressed ctrl*c when someone presses ctrl+c. My questions are what you would... (1 Reply)
Discussion started by: #moveon
1 Replies

10. Shell Programming and Scripting

Perl - Problems with Signal Handler

I have a problem with signal handlers not working. I have a long 1000 line code and somehow this code for signal handling is not working: $SIG{INT} = \&interrupt; sub interrupt { print STDERR "Caught a control c!\n"; exit; # or just about anything else you'd want to do } Any... (2 Replies)
Discussion started by: som.nitk
2 Replies

11. UNIX for Dummies Questions & Answers

Help with HUP and SEGV.

Hello - I need to know the detail of HUP and SEGV. I know HUP is Hangup and can be use to kill a Unix login session remotely by sending a hangup signal to the process running the login session. Could someone tell me in detail prupose of HUP and SEGV (segmentation violation)? I need to... (1 Reply)
Discussion started by: namasteall2000
1 Replies

12. Shell Programming and Scripting

bash dropping SIGHUPs

I've written a daemon in bash, that waits for a HUP signal and then does some processing, before waiting for the next HUP. It goes something like this: trap gothup=1 HUP while :; do gothup=0 # do some processing ... # now wait for a HUP ... while ; do sleep 30 &... (4 Replies)
Discussion started by: cambridge
4 Replies