Skip to content

Commit

Permalink
Hack wrapper to work around segfault (brave/brave-browser#4142)
Browse files Browse the repository at this point in the history
The `brave` binary returns a non-zero error code and that causes
the wrapper to return a non-zero error code too. Since it's not
possible to override the error code with an `exec` call (`exec`
will terminate the shell immediately with a successful return
value), we need to keep the original shell around so that we can
hide the true return value of the `brave` binary.

This hack should be removed once we have fixed the crash.
  • Loading branch information
fmarier committed Sep 20, 2019
1 parent 3048371 commit daa14f1
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions patches/chrome-installer-linux-common-wrapper.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
diff --git a/chrome/installer/linux/common/wrapper b/chrome/installer/linux/common/wrapper
index dbbeb27ea037ae1046c38f4006ddccabfeea9e18..fa51c4947d0261bb0138d54f1e807715bba0d345 100755
--- a/chrome/installer/linux/common/wrapper
+++ b/chrome/installer/linux/common/wrapper
@@ -45,5 +45,4 @@ exec < /dev/null
exec > >(exec cat)
exec 2> >(exec cat >&2)

-# Note: exec -a below is a bashism.
-exec -a "$0" "$HERE/@@PROGNAME@@" "$@"
+"$HERE/@@PROGNAME@@" "$@" || true

0 comments on commit daa14f1

Please sign in to comment.