Skip to content
Snippets Groups Projects
Commit 8d699641 authored by Simon McVittie's avatar Simon McVittie
Browse files

adverb: Use pv_async_signal_safe_error()

parent b5d925ac
No related branches found
No related tags found
No related merge requests found
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
#include "bwrap-lock.h" #include "bwrap-lock.h"
#include "flatpak-utils-base-private.h" #include "flatpak-utils-base-private.h"
#include "launcher.h"
#include "utils.h" #include "utils.h"
#ifndef PR_SET_CHILD_SUBREAPER #ifndef PR_SET_CHILD_SUBREAPER
...@@ -63,17 +64,7 @@ child_setup_cb (gpointer user_data) ...@@ -63,17 +64,7 @@ child_setup_cb (gpointer user_data)
/* Put back the original stdout for the child process */ /* Put back the original stdout for the child process */
if (fd != NULL && if (fd != NULL &&
dup2 (*fd, STDOUT_FILENO) != STDOUT_FILENO) dup2 (*fd, STDOUT_FILENO) != STDOUT_FILENO)
{ pv_async_signal_safe_error ("pressure-vessel-adverb: Unable to reinstate original stdout\n", LAUNCH_EX_FAILED);
/* There's not much we can do about that: most error reporting
* is not async-signal-safe */
const char message[] =
"pressure-vessel-adverb: Unable to reinstate original stdout\n";
if (write (STDERR_FILENO, message, sizeof (message) - 1) < 0)
{
/* do nothing, how else would we report this? */
}
}
/* Make all other file descriptors close-on-exec */ /* Make all other file descriptors close-on-exec */
flatpak_close_fds_workaround (3); flatpak_close_fds_workaround (3);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment