saleyn / erlexec

Execute and control OS processes from Erlang/OTP
https://hexdocs.pm/erlexec/readme.html
Other
541 stars 141 forks source link

Getting strange return from exec:run #42

Closed dsabanin closed 10 years ago

dsabanin commented 10 years ago

I'm trying the following code:

exec:run(["/usr/bin/docker", "commit", TempName, FinalName], [sync, stdout, stderr])

And sometimes I get the usual response with exit codes and stdout/stderr strings, but sometimes I get this:

{error, [{reason,
            {'DOWN', #Ref<0.0.65.102600>, process, <0.14791.3>, normal}}]}

I checked and the command actually was executed just fine and exited properly, but for some reason the return is not the usual exit status.

I've enabled verbose/debug mode and enabled tracer for exec module – https://gist.github.com/dsabanin/80a8a1edb705377bfe34. Any ideas are greatly appreciated. Thanks!

saleyn commented 10 years ago

Do you get the same error when you run it as: exec:run("/usr/bin/docker commit " ++ TempName ++ " " ++ FinalName, [sync, stdout, stderr])