Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

detach chromium from shell script PID when using brew provided wrapper #104850

Merged
merged 2 commits into from
May 4, 2021

Commits on Apr 30, 2021

  1. When invoked from command line use exec to replace shell

    This simple shell wrapper is provided to execute chromium from command line.
    The way it is defined, chromium will have the PID `/bin/sh` as PPID:
    
    ```
      501 77821  1088   0  6:24pm ttys028    0:01.53 -zsh
      501 78177 77821   0  6:24pm ttys028    0:00.01 /bin/sh /usr/local/bin/chromium
      501 78181 78177   0  6:24pm ttys028    0:01.83 /Applications/Chromium.app/Contents/MacOS/Chromium
    ```
    
    I'm using chromedp to interact with `chromium/Chrome`, and this
    behaviour triggers some issues. When the execution context is done in
    the library, it triggers the termination of the shell process instead of the chromium process and
    chromium is left as an orphan process on the system.
    
    There is an open issue documenting this behaviour [here](chromedp/chromedp#752)
    
    Using `exec` will detach `chomium` process from the shell, and will provide
    expected behaviour when called with such libraries; user
    experience when calling `chromium` from the shell will not change.
    
    ```
      501 77821  1088   0  6:24pm ttys028    0:01.61 -zsh
      501 93092 77821   0  6:26pm ttys028    0:01.40 /Applications/Chromium.app/Contents/MacOS/Chromium
    ```
    
    Thank you.
    fbessett committed Apr 30, 2021
    Configuration menu
    Copy the full SHA
    4c1ee0d View commit details
    Browse the repository at this point in the history

Commits on May 4, 2021

  1. Update chromium.rb

    miccal committed May 4, 2021
    Configuration menu
    Copy the full SHA
    70c60ea View commit details
    Browse the repository at this point in the history