TDengine/include/os/osSignal.h

66 lines
1.4 KiB
C
Raw Normal View History

2021-09-30 09:10:36 +00:00
/*
* Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
*
* This program is free software: you can use, redistribute, and/or modify
* it under the terms of the GNU Affero General Public License, version 3
* or later ("AGPL"), as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _TD_OS_SIGNAL_H_
#define _TD_OS_SIGNAL_H_
#ifdef __cplusplus
extern "C" {
#endif
2021-09-30 13:21:51 +00:00
#ifndef SIGALRM
2022-10-13 03:09:43 +00:00
#define SIGALRM 1234
2021-09-30 13:21:51 +00:00
#endif
#ifndef SIGHUP
2022-10-13 03:09:43 +00:00
#define SIGHUP 1230
2021-09-30 13:21:51 +00:00
#endif
#ifndef SIGCHLD
2022-10-13 03:09:43 +00:00
#define SIGCHLD 1234
2021-09-30 13:21:51 +00:00
#endif
#ifndef SIGUSR1
2022-10-13 03:09:43 +00:00
#define SIGUSR1 1234
2021-09-30 13:21:51 +00:00
#endif
#ifndef SIGUSR2
2022-10-13 03:09:43 +00:00
#define SIGUSR2 1234
2021-09-30 13:21:51 +00:00
#endif
#ifndef SIGBREAK
2022-10-13 03:09:43 +00:00
#define SIGBREAK 1234
2021-09-30 13:21:51 +00:00
#endif
#ifdef WINDOWS
typedef BOOL (*FSignalHandler)(DWORD fdwCtrlType);
#else
2021-09-30 13:21:51 +00:00
typedef void (*FSignalHandler)(int32_t signum, void *sigInfo, void *context);
#endif
2024-07-24 08:37:54 +00:00
typedef void (*sighandler_t)(int);
2024-07-24 07:00:23 +00:00
int32_t taosSetSignal(int32_t signum, FSignalHandler sigfp);
int32_t taosIgnSignal(int32_t signum);
int32_t taosDflSignal(int32_t signum);
2021-09-30 09:10:36 +00:00
2024-07-24 07:00:23 +00:00
int32_t taosKillChildOnParentStopped();
2022-03-30 13:09:23 +00:00
2021-09-30 09:10:36 +00:00
#ifdef __cplusplus
}
#endif
2022-10-13 03:09:43 +00:00
#endif /*_TD_OS_SIGNAL_H_*/