IonicaBizau / web-term

:tv: A fullscreen terminal in your browser.
MIT License
168 stars 21 forks source link

Not working when used as child process #57

Closed rtwk closed 7 years ago

rtwk commented 7 years ago

I was using web-term as child process. And it was working fine. But after updating to the latest version (node v6>), it fails to start web-term as child process. It works when started from terminal directly though.

IonicaBizau commented 7 years ago

Just observed the same error. :+1:

As side effect, the -d option is not working too... Help is appreciated!

Other modules are affected and I'm not sure how to solve it...

rtwk commented 7 years ago

-d option is working in my case. But no luck with starting it a as a child process.

IonicaBizau commented 7 years ago

Interesting! So, after doing web-term -d -p 9000 are you able to open the localhost:9000?

rtwk commented 7 years ago

No it is not accessible over http. But the daemon seems to start. At least not throwing any error message. May be you are right. It does not start at all.

IonicaBizau commented 7 years ago

Yes, no error, but it fails to start for the same reason. I think it's breaking because of the new version of Node, but don't understand why.

rtwk commented 7 years ago

This is very strange. It starts when started from terminal but you call it from nodejs code as a child process and it fails.

IonicaBizau commented 7 years ago

Exactly...

rtwk commented 7 years ago

Is it because new version of node or because it is rewrite in ES6

IonicaBizau commented 7 years ago

It's not because of rewrite. It makes me think it's because of the new Tilda versions (>=4.4.0):

https://github.com/IonicaBizau/tilda

There I added some process.stdin things which are related to this behavior....

IonicaBizau commented 7 years ago

Confirming it's a bug in Tilda: https://github.com/IonicaBizau/tilda/issues/11

I'm on it.

IonicaBizau commented 7 years ago

Isolated this case: http://stackoverflow.com/q/40588859/1420197

IonicaBizau commented 7 years ago

@rtwk When you want to start it as child process, use spawno or specify stdio: ["inherit"] in the spawn options.