avoid an unncessary use of the shell
This commit is contained in:
parent
2711d13d55
commit
7fc84717e8
1 changed files with 3 additions and 8 deletions
|
@ -53,14 +53,9 @@ toBatchCommand (command, params) = do
|
||||||
, ("ionice", ["-c3"])
|
, ("ionice", ["-c3"])
|
||||||
, ("nocache", [])
|
, ("nocache", [])
|
||||||
]
|
]
|
||||||
let command' = "sh"
|
let (command', params') = case nicers of
|
||||||
let params' =
|
[] -> (command, params)
|
||||||
[ Param "-c"
|
(first:rest) -> (fst first, map Param (snd first ++ concatMap (\p -> fst p : snd p) rest ++ [command]) ++ params)
|
||||||
, Param $ unwords $
|
|
||||||
"exec"
|
|
||||||
: concatMap (\p -> fst p : snd p) nicers
|
|
||||||
++ map shellEscape (command : toCommand params)
|
|
||||||
]
|
|
||||||
#else
|
#else
|
||||||
let command' = command
|
let command' = command
|
||||||
let params' = params
|
let params' = params
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue