Displaying 20 results from an estimated 379 matches for "_exit".
Did you mean:
exit
2010 Mar 19
0
[PATCH] Change some _exit(0|1) to _exit(EXIT_SUCCESS|EXIT_FAILURE).
...turn machines into Xen guests.
http://et.redhat.com/~rjones/virt-p2v
-------------- next part --------------
>From 1cb5de862a92322b3c8c682324b865fb2be5368c Mon Sep 17 00:00:00 2001
From: Richard Jones <rjones at redhat.com>
Date: Fri, 19 Mar 2010 17:19:49 +0000
Subject: [PATCH] Change some _exit(0|1) to _exit(EXIT_SUCCESS|EXIT_FAILURE).
---
src/guestfs.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/guestfs.c b/src/guestfs.c
index 02d5fdb..729b687 100644
--- a/src/guestfs.c
+++ b/src/guestfs.c
@@ -1268,7 +1268,7 @@ guestfs__launch (guestfs_h *g)...
2011 Mar 30
0
(fwd) Bug#618616: arm build failure with latest binutils - usr/klibc/syscalls/_exit.S:29: Error: .size expression does not evaluate to a constant
...---- Forwarded message from Lo?c Minier <lool at dooz.org> -----
Date: Wed, 16 Mar 2011 23:34:51 +0100
From: Lo?c Minier <lool at dooz.org>
To: Debian Bug Tracking System <submit at bugs.debian.org>
Subject: Bug#618616: arm build failure with latest binutils -
usr/klibc/syscalls/_exit.S:29: Error: .size expression does not
evaluate to a constant
Package: klibc
Version: 1.5.21-1
Tags: patch
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu natty ubuntu-patch
Hey
klibc fails to build with recent binutils as "as" became stricter:
http://sourc...
2011 Sep 17
1
[LLVMdev] Jumping to a fixed address in Clang
I am compiling some code with Clang which needs to jump to a fixed
address to perform a "syscall". These fixed addresses contain valid
code.
I noticed that this code produces a warning:
typedef void (*exit_syscall_type) (int status) __attribute__((noreturn));
void _exit(int status) __attribute__ ((noreturn));
void _exit(int status) {
((exit_syscall_type)0x10000)(status);
}
This (seemingly equivalent) code does not:
typedef void (*exit_syscall_type) (int status) __attribute__((noreturn));
void _exit(int status) __attribute__ ((noreturn));
void _exit(int status)...
2016 Aug 03
3
[PATCH] mllib: move _exit from v2v as Exit module
Move the OCaml binding to C _exit to an own module.
Just code motion, adapting v2v in the process.
---
docs/C_SOURCE_FILES | 2 +-
mllib/Makefile.am | 5 ++++-
mllib/exit-c.c | 33 +++++++++++++++++++++++++++++++++
mllib/exit.ml | 19 +++++++++++++++++++
mllib/exit.mli | 20 ++++++++++++++++++++
v2v/Makefile.a...
2015 Dec 02
3
[PATCH] daemon: improve internal commandrvf
...+932,44 @@ commandrvf (char **stdoutput, char **stderror, int flags,
signal (SIGPIPE, SIG_DFL);
close (0);
if (flag_copy_stdin) {
- dup2 (flag_copy_fd, STDIN_FILENO);
+ if (dup2 (flag_copy_fd, STDIN_FILENO) == -1) {
+ perror ("dup2/flag_copy_fd");
+ _exit (EXIT_FAILURE);
+ }
} else {
- /* Set stdin to /dev/null (ignore failure) */
- ignore_value (open ("/dev/null", O_RDONLY|O_CLOEXEC));
+ /* Set stdin to /dev/null. */
+ if (open ("/dev/null", O_RDONLY) == -1) {
+ perror ("open(/dev/null)&...
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
2015 Dec 02
0
Re: [PATCH] daemon: improve internal commandrvf
...utput, char **stderror, int flags,
> signal (SIGPIPE, SIG_DFL);
> close (0);
> if (flag_copy_stdin) {
> - dup2 (flag_copy_fd, STDIN_FILENO);
> + if (dup2 (flag_copy_fd, STDIN_FILENO) == -1) {
> + perror ("dup2/flag_copy_fd");
> + _exit (EXIT_FAILURE);
> + }
close(0) explicitly assumes that stdin is 0, which is fine, but dup2
uses STDIN_FILENO (which itself is also fine), but you should stick to
one scheme.
> } else {
> - /* Set stdin to /dev/null (ignore failure) */
> - ignore_value (open ("...
2006 Sep 25
2
Auth problem
Dovecot 1.07rc1 on ubuntu 6.04 I get the following problem:
root 26375 0.0 0.2 5548 2240 ? Ss Sep15 1:39 /usr/sbin/dovecot
root 26376 0.0 0.3 7896 3364 ? S Sep15 0:31 \_ dovecot-auth
root 26378 0.0 0.3 8304 3824 ? S Sep15 0:34 \_ dovecot-auth
root 26379 0.0 0.4 8668 4152 ? S Sep15 0:38 \_ dovecot-auth
root
2011 Apr 14
1
Bug#618616: arm build failure with latest binutils - usr/klibc/syscalls/_exit.S:29: Error: .size expression does not evaluate to a constant
tags 618616 pending
stop
On Wed, 16 Mar 2011, Lo?c Minier wrote:
> I've fixed this in Ubuntu with the attached patch, but didn't find
> where to upstream it; since you're a klibc upstream developer and since
> it probably already affects Debian, I figured it was probably best to
> send it here :-)
thank you applied after review by hpa and pushed out to klibc git.
2009 Aug 19
2
[PATCH libguestfs] guestfish: detect a few more failed syscalls
...ror ("fork");
@@ -760,7 +766,10 @@ issue_command (const char *cmd, char *argv[], const char *pipecmd)
if (pid == 0) { /* Child process. */
close (fd[1]);
- dup2 (fd[0], 0);
+ if (dup2 (fd[0], 0) < 0) {
+ perror ("dup2 of stdin failed");
+ _exit (1);
+ }
r = system (pipecmd);
if (r == -1) {
@@ -770,9 +779,16 @@ issue_command (const char *cmd, char *argv[], const char *pipecmd)
_exit (WEXITSTATUS (r));
}
- stdout_saved_fd = dup (1);
+ if ((stdout_saved_fd = dup (1)) < 0) {
+ perror ("faile...
2019 Sep 26
2
Re: [PATCH libnbd 2/2] api: Implement local command with systemd socket activation.
...F_GETFD");
perror is not async-signal-safe. Calling it in a child of a
potentially-multi-threaded parent is therefore prone to deadlock, if
perror() triggers a request to grab any resource that was left locked by
a different thread holding the lock but stranded by the fork.
> + _exit (EXIT_FAILURE);
> + }
> + if (fcntl (s, F_SETFD, flags & ~FD_CLOEXEC) == -1) {
> + perror ("fcntl: F_SETFD");
> + _exit (EXIT_FAILURE);
> + }
About all we can _safely_ do is let our _exit() status inform the parent
process that something f...
2016 Apr 13
3
[PATCH libguestfs] launch: Implement a safer getumask.
...= -1) {
+ perrorf (g, "fork");
+ close (fd[0]);
+ close (fd[1]);
+ return -1;
+ }
+ if (pid == 0) {
+ /* The child process must ONLY call async-safe functions. */
+ close (fd[0]);
+
+ mask = umask (0);
+ if (mask == -1) {
+ perror ("umask");
+ _exit (EXIT_FAILURE);
+ }
+
+ if (write (fd[1], &mask, sizeof mask) != sizeof mask) {
+ perror ("write");
+ _exit (EXIT_FAILURE);
+ }
+ if (close (fd[1]) == -1) {
+ perror ("close");
+ _exit (EXIT_FAILURE);
+ }
+
+ _exit (EXIT_SUCCESS);
+ }
+...
2023 Mar 23
1
[libnbd PATCH v3 14/19] CONNECT_COMMAND.START: plug child process leak on error
...pid = fork ();
if (pid == -1) {
set_error (errno, "fork");
- goto close_socket_pair;
+ goto close_high_level_socket;
}
if (pid == 0) { /* child - run command */
if (close (sv[0]) == -1) {
nbd_internal_fork_safe_perror ("close");
_exit (126);
}
if (dup2 (sv[1], STDIN_FILENO) == -1 ||
dup2 (sv[1], STDOUT_FILENO) == -1) {
nbd_internal_fork_safe_perror ("dup2");
_exit (126);
}
NBD_INTERNAL_FORK_SAFE_ASSERT (sv[1] != STDIN_FILENO);
NBD_INTERNAL_FORK_SAFE_ASSERT (sv[1] != STDOU...
2016 Jan 21
0
[PATCH v3 2/6] daemon: Split out command() functions and CLEANUP_* macros into separate files.
...abort ();
+ }
+
+ if (pid == 0) { /* Child process running the command. */
+ signal (SIGALRM, SIG_DFL);
+ signal (SIGPIPE, SIG_DFL);
+ close (0);
+ if (flag_copy_stdin) {
+ if (dup2 (flag_copy_fd, STDIN_FILENO) == -1) {
+ perror ("dup2/flag_copy_fd");
+ _exit (EXIT_FAILURE);
+ }
+ } else {
+ /* Set stdin to /dev/null. */
+ if (open ("/dev/null", O_RDONLY) == -1) {
+ perror ("open: /dev/null");
+ _exit (EXIT_FAILURE);
+ }
+ }
+ close (so_fd[PIPE_READ]);
+ close (se_fd[PIPE_READ]);
+ if...
2011 May 31
6
[PATCH 1/4] febootstrap: Look for insmod.static, mke2fs in /sbin
---
configure.ac | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
index da03c9f..7606bca 100644
--- a/configure.ac
+++ b/configure.ac
@@ -68,7 +68,8 @@ dnl For ArchLinux handler.
AC_CHECK_PROG(PACMAN,[pacman],[pacman],[no])
dnl Required programs, libraries.
-AC_PATH_PROG([INSMODSTATIC],[insmod.static],[no])
2019 Sep 27
0
Re: [PATCH libnbd 2/2] api: Implement local command with systemd socket activation.
...gineer exactly how
something failed given only a slim error log to know that error
messages are always useful and I wouldn't want to remove these.
However because of the chance of deadlock, how about a deadlock-free
function that write(2)'s the message + errno to stderr?
> >+ _exit (EXIT_FAILURE);
> >+ }
> >+ if (fcntl (s, F_SETFD, flags & ~FD_CLOEXEC) == -1) {
> >+ perror ("fcntl: F_SETFD");
> >+ _exit (EXIT_FAILURE);
> >+ }
>
> About all we can _safely_ do is let our _exit() status inform the
&g...
2017 Nov 20
3
[nbdkit PATCH 0/2] Add nbd forwarder test coverage
To avoid bitrot, any new feature needs testsuite coverage ;)
Still to come: once I get my work on parallel nbd finished,
I will add a test-parallel-nbd.sh that closely mirrors what
my other series added in test-parallel-file.sh.
If desired, it might be a fun exercise to tweak test-nbd into
using a for-loop of user-controlled depth for how deep you
want to nest the forwarding tree, to see where
2002 Mar 12
0
OpenSSH 3.1: ssh-rand-helper
...uot;, strerror(errno));
--- 67,73 ----
return;
}
! debug3("Seeing PRNG from %s", _PATH_SSH_RAND_HELPER);
if ((devnull = open("/dev/null", O_RDWR)) == -1)
fatal("Couldn't open /dev/null: %s", strerror(errno));
***************
*** 91,99 ****
_exit(1);
}
! execl(SSH_RAND_HELPER, "ssh-rand-helper", NULL);
fprintf(stderr, "(rand child) Couldn't exec '%s': %s\n",
! SSH_RAND_HELPER, strerror(errno));
_exit(1);
}
--- 91,99 ----
_exit(1);
}
! execl(_PATH_SSH_RAND_HELPER...
2016 Apr 13
0
Re: [PATCH libguestfs] launch: Implement a safer getumask.
...and could permanently
wedgelock the child if you happened to fork() while some other thread
was also using stdio). Safe error reporting in a fork()d child is
basically impossible; the best you can do is write() something back to
the parent and let the parent do the error reporting. :(
> + _exit (EXIT_FAILURE);
> + }
> +
> + if (write (fd[1], &mask, sizeof mask) != sizeof mask) {
> + perror ("write");
> + _exit (EXIT_FAILURE);
> + }
> + if (close (fd[1]) == -1) {
> + perror ("close");
Again, more bad use of perror....
2008 Jun 27
2
[LLVMdev] Implementing llvm.atomic.cmp.swap.i32 on PowerPC
...n PowerPC. I figured out LWARX (patch
attached) but the other two (CMP_UNRESw and STWCX) require multiple
instructions:
let Defs = [CR0] in {
def STWCX : Pseudo<(outs), (ins GPRC:$rS, memrr:$dst, i32imm:$label),
"stwcx. $rS, $dst\n\tbne- La${label}_entry\nLa${label}_exit:",
[(PPCstcx GPRC:$rS, xoaddr:$dst, imm:$label)]>;
def CMP_UNRESw : Pseudo<(outs), (ins GPRC:$rA, GPRC:$rB, i32imm:$label),
"cmpw $rA, $rB\n\tbne- La${label}_exit",
[(PPCcmp_unres GPRC:$rA, GPRC:$rB...