~ubuntu-branches/debian/jessie/stellarium/jessie

« back to all changes in this revision

Viewing changes to src/external/kdewin32/signal.h

  • Committer: Bazaar Package Importer
  • Author(s): Cédric Delfosse
  • Date: 2009-03-13 20:07:22 UTC
  • mfrom: (1.1.8 upstream)
  • mto: (11.1.1 experimental)
  • mto: This revision was merged to the branch mainline in revision 7.
  • Revision ID: james.westby@ubuntu.com-20090313200722-gbgujsmzsa8a02ty
Import upstream version 0.10.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* This file is part of the KDE project
 
2
   Copyright (C) 2003-2004 Jaroslaw Staniek <js@iidea.pl>
 
3
 
 
4
   This program is free software; you can redistribute it and/or
 
5
   modify it under the terms of the GNU Library General Public
 
6
   License as published by the Free Software Foundation; either
 
7
   version 2 of the License, or (at your option) any later version.
 
8
 
 
9
   This program is distributed in the hope that it will be useful,
 
10
   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
12
   Library General Public License for more details.
 
13
 
 
14
   You should have received a copy of the GNU Library General Public License
 
15
   along with this program; see the file COPYING.  If not, write to
 
16
   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 
17
   Boston, MA 02110-1301, USA.
 
18
*/
 
19
 
 
20
#ifndef KDE_SIGNAL_H
 
21
#define KDE_SIGNAL_H
 
22
 
 
23
#include "kdewin32/sys/types.h"
 
24
 
 
25
#ifdef  __cplusplus
 
26
extern "C" {
 
27
#endif
 
28
 
 
29
//additional defs (some are sommented out because winows defines these):
 
30
#define SIGHUP  1       /* hangup */
 
31
/* #define      SIGINT  2*/     /* interrupt */
 
32
#define SIGQUIT 3       /* quit */
 
33
/* #define      SIGILL  4*/     /* illegal instruction (not reset when caught) */
 
34
#define SIGTRAP 5       /* trace trap (not reset when caught) */
 
35
/* #define      SIGABRT 6*/     /* used by abort */
 
36
#define SIGEMT  7       /* EMT instruction */
 
37
/* #define      SIGFPE  8*/     /* floating point exception */
 
38
#define SIGKILL 9       /* kill (cannot be caught or ignored) */
 
39
/* #define      SIGBUS  10      */ /* bus error, only used in  kconfigbackend.cpp but this signal.h is not complete */
 
40
#define SIGSEGV 11      /* segmentation violation */
 
41
#define SIGSYS  12      /* bad argument to system call */
 
42
#define SIGPIPE 13      /* write on a pipe with no one to read it */
 
43
#define SIGALRM 14      /* alarm clock */
 
44
/* #define      SIGTERM 15*/    /* software termination signal from kill */
 
45
#define SIGURG  16      /* urgent condition on IO channel */
 
46
#define SIGSTOP 17      /* sendable stop signal not from tty */
 
47
#define SIGTSTP 18      /* stop signal from tty */
 
48
#define SIGCONT 19      /* continue a stopped process */
 
49
#define SIGCHLD 20      /* to parent on child stop or exit */
 
50
#define SIGCLD  20      /* System V name for SIGCHLD */
 
51
#define SIGTTIN 21      /* to readers pgrp upon background tty read */
 
52
#define SIGTTOU 22      /* like TTIN for output if (tp->t_local&LTOSTOP) */
 
53
#define SIGIO   23      /* input/output possible signal */
 
54
#define SIGPOLL SIGIO   /* System V name for SIGIO */
 
55
#define SIGXCPU 24      /* exceeded CPU time limit */
 
56
#define SIGXFSZ 25      /* exceeded file size limit */
 
57
#define SIGVTALRM 26    /* virtual time alarm */
 
58
#define SIGPROF 27      /* profiling time alarm */
 
59
#define SIGWINCH 28     /* window changed */
 
60
#define SIGLOST 29      /* resource lost (eg, record-lock lost) */
 
61
#define SIGUSR1 30      /* user defined signal 1 */
 
62
#define SIGUSR2 31      /* user defined signal 2 */
 
63
 
 
64
/**
 
65
 Sends signal to a process. 
 
66
 */
 
67
int kill(pid_t pid, int sig);
 
68
 
 
69
/** A typedef for signal handler
 
70
 */
 
71
typedef void (*sighandler_t)(int);
 
72
 
 
73
/**
 
74
 Sets interrupt signal handling. 
 
75
 This is a wrapper of signal() function from the Windows CRT module
 
76
 provided for portability. Should be used as KDE_signal() in KDE code.
 
77
 
 
78
 instead of raising error (asseriting), for UNIX compatibility,
 
79
 it does nothing (but stil returns SIG_ERR) for the types other than
 
80
 SIGABRT, SIGFPE, SIGILL, SIGINT, SIGSEGV, SIGTERM.
 
81
 
 
82
 Most notable examples of unsupported signal types are SIGKILL, SIGHUP and SIGBUS.
 
83
 
 
84
 @see http://msdn2.microsoft.com/en-us/library/xdkz3x12(VS.80).aspx for list 
 
85
 of supported signals.
 
86
 
 
87
 @return the previous handler associated with the given signal. 
 
88
 Returns SIG_ERR on error, in which case errno is set to EINVAL. 
 
89
*/
 
90
sighandler_t kdewin32_signal(int signum, sighandler_t handler);
 
91
 
 
92
#ifdef  __cplusplus
 
93
}
 
94
#endif
 
95
 
 
96
#include <../include/signal.h>
 
97
 
 
98
#endif // KDE_SIGNAL_H