You're missing the important part in that example:
    
    
    let outp =
    
    
    Run

The way you're doing it is correct, but `execProcess` returns a `TaintedString` 
([doc](https://nim-lang.org/docs/osproc.html#execProcess%2Cstring%2Cstring%2CopenArray%5Bstring%5D%2CStringTableRef%2Cset%5BProcessOption%5D)),
 so you'd have to capture it or explicitly discard the result with `discard` 
like this:
    
    
    # default options contains poEvalCommand, which will ignore args, so we 
specify our own set
    discard execProcess("pkill", args=[" -9", process], options = 
{poStdErrToStdOut, poUsePath})
    
    
    Run

Unlike most languages, Nim does not allow you to drop a function return value 
implicitly.

Reply via email to