Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Send EOF to the remote on input EOF #811

Merged
merged 1 commit into from
Jun 27, 2013
Merged

Conversation

dividedmind
Copy link
Contributor

Attached patch sends 4.chr to the remote on input EOF. It finally makes it possible to pipe stuff to heroku run. Fixes issue #256

@dividedmind
Copy link
Contributor Author

A friendly reminder. (Failed tests seem unrelated.)

@opsb
Copy link

opsb commented Jun 8, 2013

This would be so useful, please merge it in :)

wuputah added a commit that referenced this pull request Jun 27, 2013
Send EOF to the remote on input EOF
@wuputah wuputah merged commit f49dd8c into heroku:master Jun 27, 2013
@wuputah
Copy link
Contributor

wuputah commented Jun 27, 2013

Thanks!

@ejfinneran
Copy link

Do you know if this will also fix #674?

@wuputah
Copy link
Contributor

wuputah commented Jun 27, 2013

Not sure.

@dividedmind
Copy link
Contributor Author

Thanks for merging!

(As for #674, I'm afraid it won't fix it, it looks totally unrelated.)

@dividedmind dividedmind deleted the remote-eof branch June 27, 2013 18:15
@pedro
Copy link
Contributor

pedro commented Jul 25, 2013

Is this supposed to work?

$ echo ls | heroku run bash

ls is pipped in, but the run session gets stuck after that.

@wuputah
Copy link
Contributor

wuputah commented Jul 31, 2013

I think there is still a bug here about stdin/stdout being non-interactive (not being a tty) - that status is not being passed to the recipient process, so you're seeing weird behavior. I think that would be fixed by passing an empty ps_env in this case but I'm not sure. I don't have this issue when using the API + rendezvous directly:
https://gist.github.com/wuputah/5880052

@dividedmind
Copy link
Contributor Author

Yeah, the problem is with bash -- actually libreadline -- detecting a terminal and trying to handle it itself. You can work around this by turning off libreadline with --noediting switch:

$ echo ls | heroku run bash --noediting -a divide
Running `bash --noediting` attached to terminal... up, run.4276
ls
~ $ ~ $ exit
$

@pre
Copy link

pre commented Aug 29, 2016

Moved my comment to the open issue #1409

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants