* Updated browser list, mainly moving gnome-open down because it does

not handle file:// URLs with a query part.
* Removed unused argument to `browser-run'
* Made `browser-run' wait just a little in case we get an error
  message from the subprocess (to avoid plt-help from exiting
  immediately)

svn: r10095

original commit: f0e71a0c1c
This commit is contained in:
Eli Barzilay 2008-06-02 23:34:25 +00:00
parent a9acd2b5a3
commit 806cd0426f

View File

@ -18,10 +18,22 @@
;; all possible unix browsers, filtered later to just existing executables ;; all possible unix browsers, filtered later to just existing executables
;; order matters: the default will be the first of these that is found ;; order matters: the default will be the first of these that is found
(define all-unix-browsers (define all-unix-browsers
'(gnome-open firefox galeon opera mozilla konqueror camino skipstone '(;; common browsers
epiphany seamonkey netscape dillo mosaic firefox galeon opera mozilla konqueror seamonkey epiphany
;; a configurable thing that is deprecated ;; known browsers
htmlview)) camino skipstone
;; broken browsers (broken in that they won't work with plt-help)
;; this is a configurable thing that is deprecated, but better
;; than gnome-open (because it works)
htmlview
;; gnome-open could be high, but the problem is that it doesn't
;; handle file:// URLs with a query string.
gnome-open
;; dillo does not have javascript
dillo
;; ancient browsers
netscape mosaic
))
;; : any -> bool ;; : any -> bool
(define (custom-browser? x) (define (custom-browser? x)
@ -227,13 +239,16 @@
#:delete-at 15))) #:delete-at 15)))
;; Process helper ;; Process helper
(define (browser-run #:shell [shell? #f] #:ignore-exit-code [nowait? #f] . args) (define (browser-run #:shell [shell? #f] . args)
(define-values (stdout stdin pid stderr control) (define-values (stdout stdin pid stderr control)
(apply values (apply (if shell? process/ports process*/ports) (apply values (apply (if shell? process/ports process*/ports)
(open-output-nowhere) #f (current-error-port) (open-output-nowhere) #f (current-error-port)
args))) args)))
(close-output-port stdin) (close-output-port stdin)
(unless nowait? ;; this is called from plt-help which will immediately exit when we
;; return, so wait just a little bit in case we'll catch an error
;; starting the browser
(sync/timeout 0.25
(thread (lambda () (thread (lambda ()
(control 'wait) (control 'wait)
(when (eq? 'done-error (control 'status)) (when (eq? 'done-error (control 'status))