Sponsored Content
Top Forums UNIX for Advanced & Expert Users Not able to Display the Catched Signal Post 302688473 by DGPickett on Sunday 19th of August 2012 11:47:28 AM
Old 08-19-2012
Signal 10, as I recall, is bus error, which is no catch but core dump if allowed. Signal 1 is hangup or HUP, very catchable even in scripts. Your man kill, man signal, signal.h will vary:
Code:
   signum   signame   Name            Description
   ___________________________________________________________________________
      0     SIGNULL   Null            Check access to pid
      1     SIGHUP    Hangup          Terminate; can be trapped
      2     SIGINT    Interrupt       Terminate; can be trapped
      3     SIGQUIT   Quit            Terminate with core dump; can be trapped
      9     SIGKILL   Kill            Forced termination; cannot be trapped
     15     SIGTERM   Terminate       Terminate; can be trapped
     24     SIGSTOP   Stop            Pause the process; cannot be trapped
     25     SIGTSTP   Terminal stop   Pause the process; can be trapped
     26     SIGCONT   Continue        Run a stopped process
 
signal.h:
 
/* Signal numbers */
#  define _SIGHUP       1       /* hangup */
#  define SIGINT        2       /* Interrupt */
#  define _SIGQUIT      3       /* quit */
#  define SIGILL        4       /* Illegal instruction (not reset when
                                   caught) */
#  define _SIGTRAP      5       /* trace trap (not reset when caught) */
#  define SIGABRT       6       /* Process abort signal */
#  define _SIGIOT       SIGABRT /* IOT instruction */
#  define _SIGEMT       7       /* EMT instruction */
#  define SIGFPE        8       /* Floating point exception */
#  define _SIGKILL      9       /* kill (cannot be caught of ignored) */
#  define _SIGBUS       10      /* bus error */
#  define SIGSEGV       11      /* Segmentation violation */
#  define _SIGSYS       12      /* bad argument to system call */
#  define _SIGPIPE      13      /* write on a pipe with no one to read it */
#  define _SIGALRM      14      /* alarm clock */
#  define SIGTERM       15      /* Software termination signal from kill */
#  define _SIGUSR1      16      /* user defined signal 1 */
#  define _SIGUSR2      17      /* user defined signal 2 */
#  define _SIGCHLD      18      /* Child process terminated or stopped */
#  define _SIGCLD       _SIGCHLD        /* death of a child */
#  define _SIGPWR       19      /* power state indication */
#  define _SIGVTALRM    20      /* virtual timer alarm */
#  define _SIGPROF      21      /* profiling timer alarm */
#  define _SIGIO        22      /* asynchronous I/O */
#  define _SIGPOLL      _SIGIO  /* for HP-UX hpstreams signal */
#  define _SIGWINCH     23      /* window size change signal */
#  define _SIGWINDOW    _SIGWINCH /* added for compatibility reasons */
#  define _SIGSTOP      24      /* Stop signal (cannot be caught or ignored) */
#  define _SIGTSTP      25      /* Interactive stop signal */
#  define _SIGCONT      26      /* Continue if stopped */
#  define _SIGTTIN      27      /* Read from control terminal attempted by a
                                   member of a background process group */
#  define _SIGTTOU      28      /* Write to control terminal attempted by a
                                   member of a background process group */
#  define _SIGURG       29      /* urgent condition on IO channel */
#  define _SIGLOST      30      /* remote lock lost  (NFS)        */
#  define _SIGRESERVE   31      /* Save for future use */
#  define _SIGDIL       32      /* DIL signal */
#  define _SIGXCPU      33      /* CPU time limit exceeded (setrlimit)  */
#  define _SIGXFSZ      34      /* CPU file size limit exceeded (setrlimit)  */
#  define _SIGCANCEL    35      /* Used for pthread cancellation. */
#  define _SIGGFAULT    36      /* Graphics framebuffer fault */
#  define _SIGRTMIN     37      /* First (highest priority) realtime signal */
#  define _SIGRTMAX     44      /* Last (lowest priority) realtime signal */

 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

thread::signal

Hi,all! Now ,I write perl for windows platform,and will use signal for asynchronous operations ,but I find it could bring some bugs if it is used incorrectly ,pls help!!! :D (1 Reply)
Discussion started by: hhh101
1 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. Shell Programming and Scripting

Signal question

Who can explain the meaning of the &2 &1 or @, #, etc in the script? Is there any document which can explain the usage of these words in details? for example: ls /etc/sysconfig/network > /dev/null 2>&1 #@ bash, ksh and sh. Thanks in advance for ur advice. (1 Reply)
Discussion started by: GCTEII
1 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. Shell Programming and Scripting

Killed by signal 15.

Hi all I have Master script, Main script ,and 4 Child script. Master.sh #!/bin/bash /export/home/user/Main.shMain.sh #!/bin/bash /export/home/user/Child1.sh & /export/home/user/Child2.sh & /export/home/user/Child3.sh & /export/home/user/Child4.sh &I run only Master.sh script... (1 Reply)
Discussion started by: almanto
1 Replies

6. UNIX for Dummies Questions & Answers

Trying to block signal

I have this code that doesnt do what it is suppose to do. It should block signal that I send while process is running. I press control+z while this process is running and it should be blocked but it isnt. When i press control+z it gives me this.... + Stopped When I change SIGTSP into SIGINT then... (5 Replies)
Discussion started by: joker40
5 Replies

7. UNIX for Advanced & Expert Users

DISPLAY=local_host:0.0 ; export DISPLAY

Hi, from my Windows Workstation I can connect with PUTTY to an AIX 6.1 unix server. On AIX via PUTTY I run DBCA which has a grphical interface. Then : #DISPLAY=local_host:0.0 ; export DISPLAY $(hostname) $(whoami):/appli/oracle/product/10.2.0/db_1/bin#dbca _X11TransSocketINETConnect()... (12 Replies)
Discussion started by: big123456
12 Replies

8. Programming

queue a signal

A program have to receive signals and work agreed with it, but the process have to receive more than one signal when it is attending other. Those have to be queued to be attended later recived. how can i do that? thanks. (2 Replies)
Discussion started by: marmaster
2 Replies

9. Shell Programming and Scripting

Case signal

Task 1: #!/bin/ksh if then echo "Usage : $0 Signalnumber PID" exit fi case "$1" in 1) echo "Sending SIGHUP signal" kill -SIGHUP $2 ;; 2) echo "Sending SIGINT signal" kill -SIGINT $2 ;; 3) echo "Sending SIGQUIT signal" kill -SIGQUIT $2 (3 Replies)
Discussion started by: Ramesh M
3 Replies
stat.h(3HEAD)							      Headers							     stat.h(3HEAD)

NAME
stat.h, stat - data returned by stat system call SYNOPSIS
#include <sys/types.h> #include <sys/stat.h> DESCRIPTION
The system calls stat, lstat and fstat return data in a stat structure, which is defined in <stat.h>. The constants used in the st_mode field are also defined in this file: #define S_IFMT /* type of file */ #define S_IAMB /* access mode bits */ #define S_IFIFO /* fifo */ #define S_IFCHR /* character special */ #define S_IFDIR /* directory */ #define S_IFNAM /* XENIX special named file */ #define S_INSEM /* XENIX semaphore subtype of IFNAM */ #define S_INSHD /* XENIX shared data subtype of IFNAM */ #define S_IFBLK /* block special */ #define S_IFREG /* regular */ #define S_IFLNK /* symbolic link */ #define S_IFSOCK /* socket */ #define S_IFDOOR /* door */ #define S_ISUID /* set user id on execution */ #define S_ISGID /* set group id on execution */ #define S_ISVTX /* save swapped text even after use */ #define S_IREAD /* read permission, owner */ #define S_IWRITE /* write permission, owner */ #define S_IEXEC /* execute/search permission, owner */ #define S_ENFMT /* record locking enforcement flag */ #define S_IRWXU /* read, write, execute: owner */ #define S_IRUSR /* read permission: owner */ #define S_IWUSR /* write permission: owner */ #define S_IXUSR /* execute permission: owner */ #define S_IRWXG /* read, write, execute: group */ #define S_IRGRP /* read permission: group */ #define S_IWGRP /* write permission: group */ #define S_IXGRP /* execute permission: group */ #define S_IRWXO /* read, write, execute: other */ #define S_IROTH /* read permission: other */ #define S_IWOTH /* write permission: other */ #define S_IXOTH /* execute permission: other */ The following macros are for POSIX conformance (see standards(5)): #define S_ISBLK(mode) block special file #define S_ISCHR(mode) character special file #define S_ISDIR(mode) directory file #define S_ISFIFO(mode) pipe or fifo file #define S_ISREG(mode) regular file #define S_ISSOCK(mode) socket file ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ SEE ALSO
stat(2), types.h(3HEAD), attributes(5), standards(5) SunOS 5.11 30 Aug 2002 stat.h(3HEAD)
All times are GMT -4. The time now is 04:43 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy