From 4b715095cac2af5036cb4c19b174f79a55f780c8 Mon Sep 17 00:00:00 2001 From: frese Date: Tue, 9 Dec 2003 18:57:12 +0000 Subject: [PATCH] changed command-execution to parse the command-line as sexps and not calling sh --- src/packages.scm | 4 ++-- src/root-manager.scm | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/packages.scm b/src/packages.scm index 0f7df4b..5c6ec13 100644 --- a/src/packages.scm +++ b/src/packages.scm @@ -196,7 +196,7 @@ ;; *** main package ************************************************** (define-structure scsh-things - (export ((run &) :syntax)) + (export ((run &) :syntax) port->sexp-list) (open scsh)) (define-structure config @@ -215,7 +215,7 @@ get-manager-by-window create-new-manager root-wm-manage-window) - (open scheme list-lib scsh-things signals + (open scheme list-lib scsh-things signals extended-ports define-record-types threads xlib rendezvous rendezvous-channels diff --git a/src/root-manager.scm b/src/root-manager.scm index f613f55..0f7e928 100644 --- a/src/root-manager.scm +++ b/src/root-manager.scm @@ -319,8 +319,9 @@ #f (finite-complete (executables-in-path))))) (and exec (not (string=? exec "")) - ;; execute via sh -c to allow specifying arguments for the program - (& (sh -c ,exec))))) + (let* ((p (make-string-input-port exec)) + (parts (port->sexp-list p))) + (& ,parts))))) ((attach) (let* ((cm (root-wm:current-manager root-wm)) (windows-above (window-path (wm:dpy cm) (wm:window cm)))