Skip to content
This repository has been archived by the owner on Mar 5, 2022. It is now read-only.

Commit

Permalink
Fix: fresh instance of Firefox hangs which opening URL.
Browse files Browse the repository at this point in the history
Must clone stdin and stdout. This also suppresses the following message spewed by Firefox when a new tab is opened:
----------------
(process:8748): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed
console.error:
  [CustomizableUI]
  Custom widget with id loop-button does not return a valid node
console.error:
  [CustomizableUI]
  Custom widget with id loop-button does not return a valid node
----------------

Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
  • Loading branch information
jarun committed Oct 8, 2015
1 parent 32f4cdd commit 7242cf8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions googler
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@ class Result:
_stdout = os.dup(1)
os.close(1)
fd = os.open(os.devnull, os.O_RDWR)
os.dup2(fd, 2)
os.dup2(fd, 1)
try:
webbrowser.open(self.url)
finally:
Expand Down

0 comments on commit 7242cf8

Please sign in to comment.