Add `nice -19` worker process

I want to start a worker process on a different node with a certain niceness.

Basically, I want to prepend the command generated by addprocs(["mynode"]) with nice -19.

As has suggested to me on Slack, there is the exename keyword argument for addprocs. However, this seems to get Base.shell_escaped and what I effectively get is cmd = `'nice -19 julia'` instead of cmd = `nice -19 julia` which will lead to a bash error (No such file or directory).

Any ideas how to solve this?

You used a String I guess? Try using a Cmd object:

julia> using Distributed

julia> addprocs(1, exename = `nice -19 julia`)
1-element Array{Int64,1}:

That works, thanks!