Skip to content

Commit f550b93

Browse files
authored
[Distributed] exec remote process from shell (JuliaLang/julia#44156)
Keeps the job management a bit cleaner, since we will reuse the pid from sh, rather than appearing as a separate subprocess.
1 parent 6d877e7 commit f550b93

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/managers.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ function launch_on_machine(manager::SSHManager, machine::AbstractString, cnt, pa
271271
if shell == :posix
272272
# ssh connects to a POSIX shell
273273

274-
cmds = "$(shell_escape_posixly(exename)) $(shell_escape_posixly(exeflags))"
274+
cmds = "exec $(shell_escape_posixly(exename)) $(shell_escape_posixly(exeflags))"
275275
# set environment variables
276276
for (var, val) in env
277277
occursin(r"^[a-zA-Z_][a-zA-Z_0-9]*\z", var) ||
@@ -287,7 +287,7 @@ function launch_on_machine(manager::SSHManager, machine::AbstractString, cnt, pa
287287
elseif shell == :csh
288288
# ssh connects to (t)csh
289289

290-
remotecmd = "$(shell_escape_csh(exename)) $(shell_escape_csh(exeflags))"
290+
remotecmd = "exec $(shell_escape_csh(exename)) $(shell_escape_csh(exeflags))"
291291

292292
# set environment variables
293293
for (var, val) in env

0 commit comments

Comments
 (0)