**** BEGIN LOGGING AT Thu Sep 15 02:59:57 2011 Sep 15 21:39:42 halfhalo, ping Sep 15 21:39:52 mmmyyyyeessss? Sep 15 21:40:28 var fs=require('fs') Sep 15 21:40:31 oop Sep 15 21:40:42 lets say i use node tty Sep 15 21:40:55 fd = tty.open('/bin/bash') Sep 15 21:40:59 how do i read from that fd now Sep 15 21:45:50 I haven't played with tty myself yet, so looking over the docs. It actually looks like you just use the child process to talk to it. Sep 15 21:47:10 idk what that means, im still a node noob Sep 15 21:48:53 ok, so when you do tty.open it returns you an array. the first item is the file descriptor, while the second is a child process object like what is returned by spawn here: http://nodejs.org/docs/v0.4.11/api/child_processes.html Sep 15 21:49:38 it gives you a stdout, stdin, and stderr functionality for the process, in this case the /bin/bash process Sep 15 21:57:47 halfhalo, so would I use fs to read from the fd's Sep 15 21:58:26 in this case i don't think you would read the fd's Sep 15 21:58:43 then how do i get info out? Sep 15 22:00:39 it would be something like var foo - tty.open("/bin/bash"); foo[1].stdout.on('data',function(data){ console.log(data);}); foo[1].stdin.write("incoming data"); Sep 15 22:02:21 { killed: false, _internal: { onexit: [Function], pid: 18258 }, stdin: null, stdout: null, stderr: null, pid: [Getter], fds: [ 6, 6, 6 ] } Sep 15 22:02:26 that is foo[1] Sep 15 22:02:33 i can to .on of null Sep 15 22:02:36 cant Sep 15 22:03:38 pastebin console.log(tty.open("/bin/bash")) please? have no node on this system Sep 15 22:04:35 http://dpaste.com/615662/ Sep 15 22:06:24 what node version? Sep 15 22:06:36 049 Sep 15 22:08:32 ah. they didn't populate the streams for the three functions. so you do have to use the fd. let me try something really quick Sep 15 22:12:52 oh snap? is it really just that? Sep 15 22:13:09 var tmp=tty.open("/bin/bash"); Sep 15 22:13:31 tmp[0].on("data",function(data){console.log(data)}); Sep 15 22:13:54 tmp[0].write("stuff") Sep 15 22:15:09 ah Sep 15 22:17:30 do i need to do process.stdout.resume(); Sep 15 22:17:38 to get the "~ #" prompt Sep 15 22:19:46 no. process is for the main host process (and process.stdin.resume() just makes it so data is able to be input into the host stdin, not the childs) Sep 15 22:20:40 i was sorta expecting data as soon as i set the callback Sep 15 22:20:48 but that didnt happen Sep 16 00:39:54 node 0.4.12 was just released, and would actually be a really good candidate for people to install if they happen to have an earlier version in the 0.4.12 series since it removes the DigiNotar certs. Sep 16 00:45:20 actually, looking at the patch i can build a 0.2.3 node with the cert removed as well **** ENDING LOGGING AT Fri Sep 16 02:59:56 2011