[go-nuts] Re: i got error at log.Printf("Failed to read from pty master: %s", err)

2019-04-01 Thread feihong' yu
server.jscode 'use strict' let app = require('http').createServer(handler) let io = require('socket.io')(app) app.listen(3000) console.log('Listening at http://localhost:3000/') function handler (req, res) { res.writeHead(200) res.end('Testing server for http://github.com/wedeploy/gosocket

[go-nuts] Re: i got error at log.Printf("Failed to read from pty master: %s", err)

2019-04-01 Thread feihong' yu
why EOF ?? 在 2019年4月2日星期二 UTC+8上午12:10:10,feihong' yu写道: > > https://github.com/kr/pty/issues/76 > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send

[go-nuts] i got error at log.Printf("Failed to read from pty master: %s", err)

2019-04-01 Thread feihong' yu
https://github.com/kr/pty/issues/76 -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://grou

[go-nuts] Re: EOF encountered when the server sends commands to execute

2019-04-01 Thread feihong' yu
i got error at log.Printf("Failed to read from pty master: %s", err) 在 2019年4月2日星期二 UTC+8上午12:05:05,feihong' yu写道: > > # server.js > ``` > > 'use strict' > > let app = require('http').createServer(handler) > let io = require('soc

[go-nuts] EOF encountered when the server sends commands to execute

2019-04-01 Thread feihong' yu
# server.js ``` 'use strict' let app = require('http').createServer(handler) let io = require('socket.io')(app) app.listen(3000) console.log('Listening at http://localhost:3000/') function handler (req, res) { res.writeHead(200) res.end('Testing server for http://github.com/wedeploy/gosock

[go-nuts] i want to create a stream instead of socket connection? but i failed, Is this feasible?But the code didn't work. how about “”top” How to read results continuously

2019-03-30 Thread feihong' yu
package main import ( "fmt" "io" "os" "os/exec" "strings" "time" "github.com/kr/pty" ) func main() { c := exec.Command("/bin/bash", "-l") c.Env = append(os.Environ(), "TERM=xterm") tty, _ := pty.Start(c) s