search for: sig_err

Displaying 18 results from an estimated 18 matches for "sig_err".

Did you mean: sie_err
2012 Nov 17
1
Sighandlers
...nswer. I try to register a sighandler in my extension's C code. But my sighandler is never called. Is there anything preventing extensions to receive signals? I register like this: [.. some code that works ..] // register the sigint listeners. if (signal(SIGTERM, killReceiver) == SIG_ERR) { printf("2 An error occurred while setting a signal handler.%s\n", stderr); } if (signal(SIGHUP, killReceiver) == SIG_ERR) { printf("3 An error occurred while setting a signal handler.%s\n", stderr); } if (signal(SIGINT, killReceiver) ==...
1999 Oct 20
3
patch for tinc-0.3
Hi tinc list members, There were some problems with Ivo's email adresses (both zarq@iname.com and zarq@spark.icicle.dhs.org) so I resent the stuff to the mailling list. ============================================= Hi Ivo, Hier is een oplossing voor een bugje in flush_queue(), en ook wat andere troepjes zoals een tincd scheduler. Dit werkt wat beter, omdat de
2023 Mar 23
20
[libnbd PATCH v3 00/19] pass LISTEN_FDNAMES with systemd socket activation
V3 was here: <http://mid.mail-archive.com/20230215141158.2426855-1-lersek at redhat.com>. See the Notes section on each patch for the v4 updates. The series is nearly ready for merging: every patch has at least one R-b tag, except "socket activation: avoid manipulating the sign bit". The series builds, and passes "make check" and "make check-valgrind", at
2016 Mar 08
1
[PATCH] fish: reset the console on ^Z RHBZ#1213844
Patch registers SIGTSTP hook where it sends reset terminal color control sequence using write and fsync. Handler is installed only if signal is not being ignored. Patch uses rl_free_line_state and rl_cleanup_after_signal to unhook readline from terminal, then it calls original TSTP handler using approach in URL below and again hooks readline using rl_reset_after_signal. Handling is based on code
2023 Mar 23
1
[libnbd PATCH v3 07/19] socket activation: replace execvp() call with fork-safe variant
...;dup2"); @@ -189,45 +196,47 @@ CONNECT_SA.START: char buf[32]; const char *v = nbd_internal_fork_safe_itoa ((long) getpid (), buf, sizeof buf); strcpy (&env.ptr[0][PREFIX_LENGTH], v); /* Restore SIGPIPE back to SIG_DFL. */ if (signal (SIGPIPE, SIG_DFL) == SIG_ERR) { nbd_internal_fork_safe_perror ("signal"); _exit (126); } - environ = env.ptr; - execvp (h->argv.ptr[0], h->argv.ptr); + (void)nbd_internal_fork_safe_execvpe (&execvpe_ctx, &h->argv, env.ptr); nbd_internal_fork_safe_perror (h->argv....
2015 Jan 09
2
[LLVMdev] Is address space 1 reserved?
> C requires that (void*)0 generates a pointer that does not compare equal to any valid pointer. It does not require that (void*)foo, where foo is an int of value 0 but not an integer constant expression, give the same value, Does this mean constant propagation can change program semantics? -- Sanjoy
2001 Nov 17
0
[PATCH] Connect timeout
...len_t addrlen, int timeout) +{ + void (*sigh)(int); + int rc; + + if (timeout <= 0) + return(connect(sockfd, serv_addr, addrlen)); + + if (setjmp(jmpenv) == 0) + { + debug("ssh: setting connect() timeout to %d s.", + timeout); + sigh = signal(SIGALRM, timeout_sigh); + if (sigh == SIG_ERR) + sigh = SIG_IGN; /* For further restore */ + (void) alarm((unsigned int) timeout); + rc = connect(sockfd, serv_addr, addrlen); + /* restore previous behaviour */ + (void) alarm((unsigned int) 0); + (void) signal(SIGALRM, sigh); + return rc; + } else { + errno = ETIMEDOUT; + return -1; +...
2023 Mar 23
1
[libnbd PATCH v3 14/19] CONNECT_COMMAND.START: plug child process leak on error
..._SAFE_ASSERT (sv[1] != STDIN_FILENO); NBD_INTERNAL_FORK_SAFE_ASSERT (sv[1] != STDOUT_FILENO); if (close (sv[1]) == -1) { nbd_internal_fork_safe_perror ("close"); _exit (126); } /* Restore SIGPIPE back to SIG_DFL. */ if (signal (SIGPIPE, SIG_DFL) == SIG_ERR) { nbd_internal_fork_safe_perror ("signal"); _exit (126); } execvp (h->argv.ptr[0], h->argv.ptr); nbd_internal_fork_safe_perror (h->argv.ptr[0]); if (errno == ENOENT) _exit (127); else _exit (126); } - /* Parent. - *...
2019 Jun 27
2
[libnbd PATCH] tests: Add test for abrupt server death
..."--exit-with-parent", "--filter=delay", "memory", + "size=1m", "delay-reads=5", NULL }; + + /* We're going to kill the child, but don't want to wait for a zombie */ + if (signal (SIGCHLD, SIG_IGN) == SIG_ERR) { + fprintf (stderr, "%s: signal: %s\n", argv[0], strerror (errno)); + exit (EXIT_FAILURE); + } + + fd = mkstemp (pidfile); + if (fd < 0) { + fprintf (stderr, "%s: mkstemp: %s\n", argv[0], strerror (errno)); + exit (EXIT_FAILURE); + } + + nbd = nbd_create ()...
2002 Jan 26
5
[PATCH] Connect timeout
...len_t addrlen, int timeout) +{ + void (*sigh)(int); + int rc; + + if (timeout <= 0) + return(connect(sockfd, serv_addr, addrlen)); + + if (setjmp(jmpenv) == 0) + { + debug("ssh: setting connect() timeout to %d s.", + timeout); + sigh = signal(SIGALRM, timeout_sigh); + if (sigh == SIG_ERR) + sigh = SIG_IGN; /* For further restore */ + (void) alarm((unsigned int) timeout); + rc = connect(sockfd, serv_addr, addrlen); + /* restore previous behaviour */ + (void) alarm((unsigned int) 0); + (void) signal(SIGALRM, sigh); + return rc; + } else { + errno = ETIMEDOUT; + return -1; +...
2019 Jul 25
4
[PATCH libnbd] api: New nbd_kill_command API for sending a signal to the command subprocess.
Reverts commit 387cbe67c3db27e8a61117fedb6e7fad76e409ef. --- generator/generator | 18 +++++++++++++++++- lib/handle.c | 28 +++++++++++++++++++++++++++- tests/closure-lifetimes.c | 4 +++- 3 files changed, 47 insertions(+), 3 deletions(-) diff --git a/generator/generator b/generator/generator index 2cd83f1..25e4aa5 100755 --- a/generator/generator +++ b/generator/generator
2019 Jul 23
4
[libnbd PATCH] api: Allow completion callbacks to auto-retire
...-exit-with-parent", "--filter=delay", "memory", "size=1m", "delay-reads=5", NULL }; + progname = argv[0]; + /* We're going to kill the child, but don't want to wait for a zombie */ if (signal (SIGCHLD, SIG_IGN) == SIG_ERR) { fprintf (stderr, "%s: signal: %s\n", argv[0], strerror (errno)); @@ -80,11 +97,17 @@ main (int argc, char *argv[]) goto fail; } - /* Issue a read that should not complete yet. */ + /* Issue a read and trim that should not complete yet. Set up the + * trim to auto-reti...
2023 Mar 25
4
[libnbd PATCH v5 0/4] pass LISTEN_FDNAMES with systemd socket activation
V4 was here (incorrectly versioned on the mailing list as v3): <http://mid.mail-archive.com/20230323121016.1442655-1-lersek at redhat.com>. See the Notes section on each patch for the v5 updates. Laszlo Ersek (2): socket activation: generalize environment construction socket activation: set LISTEN_FDNAMES Richard W.M. Jones (2): common/include: Copy ascii-ctype functions from nbdkit
2013 Jul 15
8
[PATCH 0 of 7 v5] Introduce the tapback daemon (most of blkback in user-space)
This patch series introduces the tapback daemon, the user space daemon that acts as a device''s back-end, essentially most of blkback in user space. The daemon is responsible for coordinating the front-end and tapdisk. It creates tapdisk process as needed, instructs them to connect to/disconnect from the shared ring, and manages the state of the back-end. The shared ring between the
2012 Sep 17
9
[PATCH] Upgrade vtpmd to berlios version 0.7.4
...ignal_handler(int sig) ++{ ++ info("signal received: %d", sig); ++ if (sig == SIGTERM || sig == SIGQUIT || sig == SIGINT) stopflag = 1; ++} ++ ++static void init_signal_handler(void) ++{ ++ info("installing signal handlers"); ++ if (signal(SIGTERM, signal_handler) == SIG_ERR) { ++ error("signal(SIGTERM) failed: %s", strerror(errno)); ++ exit(EXIT_FAILURE); ++ } ++ if (signal(SIGQUIT, signal_handler) == SIG_ERR) { ++ error("signal(SIGQUIT) failed: %s", strerror(errno)); ++ exit(EXIT_FAILURE); ++ } ++ if (signal...
2013 Aug 02
3
[PATCH trivial] include: uapi: standard all files' macro prefix and suffix, excluding "linux/" sub-directory
...c/signal-defs.h @@ -1,5 +1,5 @@ -#ifndef __ASM_GENERIC_SIGNAL_DEFS_H -#define __ASM_GENERIC_SIGNAL_DEFS_H +#ifndef _UAPI_ASM_GENERIC_SIGNAL_DEFS_H +#define _UAPI_ASM_GENERIC_SIGNAL_DEFS_H #include <linux/compiler.h> @@ -25,4 +25,4 @@ typedef __restorefn_t __user *__sigrestore_t; #define SIG_ERR ((__force __sighandler_t)-1) /* error return from signal */ #endif -#endif /* __ASM_GENERIC_SIGNAL_DEFS_H */ +#endif /* _UAPI_ASM_GENERIC_SIGNAL_DEFS_H */ diff --git a/include/uapi/asm-generic/signal.h b/include/uapi/asm-generic/signal.h index 9df61f1..06107b4 100644 --- a/include/uapi/asm-gener...
2013 Aug 02
3
[PATCH trivial] include: uapi: standard all files' macro prefix and suffix, excluding "linux/" sub-directory
...c/signal-defs.h @@ -1,5 +1,5 @@ -#ifndef __ASM_GENERIC_SIGNAL_DEFS_H -#define __ASM_GENERIC_SIGNAL_DEFS_H +#ifndef _UAPI_ASM_GENERIC_SIGNAL_DEFS_H +#define _UAPI_ASM_GENERIC_SIGNAL_DEFS_H #include <linux/compiler.h> @@ -25,4 +25,4 @@ typedef __restorefn_t __user *__sigrestore_t; #define SIG_ERR ((__force __sighandler_t)-1) /* error return from signal */ #endif -#endif /* __ASM_GENERIC_SIGNAL_DEFS_H */ +#endif /* _UAPI_ASM_GENERIC_SIGNAL_DEFS_H */ diff --git a/include/uapi/asm-generic/signal.h b/include/uapi/asm-generic/signal.h index 9df61f1..06107b4 100644 --- a/include/uapi/asm-gener...
2013 Aug 02
3
[PATCH trivial] include: uapi: standard all files' macro prefix and suffix, excluding "linux/" sub-directory
...c/signal-defs.h @@ -1,5 +1,5 @@ -#ifndef __ASM_GENERIC_SIGNAL_DEFS_H -#define __ASM_GENERIC_SIGNAL_DEFS_H +#ifndef _UAPI_ASM_GENERIC_SIGNAL_DEFS_H +#define _UAPI_ASM_GENERIC_SIGNAL_DEFS_H #include <linux/compiler.h> @@ -25,4 +25,4 @@ typedef __restorefn_t __user *__sigrestore_t; #define SIG_ERR ((__force __sighandler_t)-1) /* error return from signal */ #endif -#endif /* __ASM_GENERIC_SIGNAL_DEFS_H */ +#endif /* _UAPI_ASM_GENERIC_SIGNAL_DEFS_H */ diff --git a/include/uapi/asm-generic/signal.h b/include/uapi/asm-generic/signal.h index 9df61f1..06107b4 100644 --- a/include/uapi/asm-gener...