saleyn / erlexec

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

Allow setting arbitrary pty options #159

Closed SteffenDE closed 2 years ago

SteffenDE commented 2 years ago

I agree that it would be great to support all modes mentioned in section-8 of the RFC4254.

This is a follow-up for #158 which allows not only to disable or enable echo, but set arbitrary pty settings in the run command and also while a command is already running. I'm not that proficient in C++ or Erlang, so it might not be the nicest code.

saleyn commented 2 years ago

Thank you for your contribution!

SteffenDE commented 2 years ago

Thank you for the project! Do you plan to release these changes to hex any time soon?


Other than that: I built the docs using ex_doc, would you accept a PR for that? image

saleyn commented 2 years ago

@SteffenDE, is the make test completing for you without errors? I am getting an error in your last test case:

$ make test
===> Verifying dependencies...
===> Analyzing applications...
===> Compiling erlexec
===> Performing EUnit tests...
..................F
==> Test Concurrency: 900
.
Failures:

  1) exec:exec_test_/0:1401
     Failure/Error: ?assertMatch({ stdout , I , << "test\r\n" >> }, timeout)
       expected: = { stdout , I , << "test\r\n" >> }
            got: timeout
     %% eunit_proc.erl:570:in `eunit_proc:run_group/2`
     Output: 
     Output: 

Finished in 18.456 seconds
20 tests, 1 failures
===> Error running tests
make: *** [Makefile:37: test] Error 1

I will publish it to hex when this issue is resolved.

saleyn commented 2 years ago

See https://github.com/saleyn/erlexec/issues/160