00:00:19 would probably screw up something else like netcat tho 00:01:07 speaking of netcat.. how are you using it? netcat < blah > blah ? 00:01:49 netcat -e whatever 00:02:13 I mean for capturing program i/o 00:02:27 netcat -e whatever 00:03:04 -e, --exec=PROGRAM program to exec after connect 00:03:09 oic 00:03:22 so netcat is pulling this off then 00:03:53 so that means it should be possible 00:04:42 It probably just does the right dup2's, I don't know whether it messes with the buffering ... 00:05:05 In fact, I doubt severely that it does. 00:05:28 well it works good enough to wrap the interpreters and that's all I need 00:05:52 * calamari downloads the source 00:07:46 ... I don't wrap any interpreter in netcat ... 00:08:04 then what is "whatever" ? 00:08:15 egobot itself 00:08:25 how is egobot handling program I/O ? 00:08:41 pipes, dup2'd into stdin and stdout. 00:09:25 * calamari downloads egobot 00:09:45 Heh 00:11:53 ahh GPL.. so I can lift large sections of your code at will :) 00:12:15 Please 00:13:14 // set up our output 00:13:15 signal(14, sendOutput); 00:13:39 -!- Sgeo has joined. 00:13:46 signal 14 = alarm, it does an output every 1.5 (?) seconds and uses alarm() to manage that. 00:13:53 But that's not really the code you want. 00:13:57 The code you want is probably in proc.* 00:14:22 well I think I found one thing I want 00:14:24 // make stdin nonblocking 00:14:24 if (fcntl(0, F_SETFL, O_NONBLOCK) == -1) { perror("fcntl"); exit(1); } 00:16:58 ahh, you're doing that on the pipe too 00:23:10 -!- Sgeo has quit. 00:23:43 dup2(2, 3); // what does this do ? 00:24:21 O_O 00:24:26 Did I seriously do that ...? 00:24:29 yes 00:24:50 maybe thats why it is crashing? :) 00:24:55 Oh, right, I remember. 00:24:58 No, that's right. 00:25:05 2 is stderr, I copied it to 3 to preserve it. 00:25:14 what if something else was using 3 00:25:16 That's still nae good though >_O 00:25:25 Yeah, I'm wondering why I thought that was wise <_< 00:26:25 AFAICT, it's not even being used 8-X 00:26:31 Well that's just plain silly. 00:26:42 So, erm, ignore that ^^ 00:27:25 should I submit a patch? lol 00:28:33 -!- CXII has joined. 00:41:39 GregorR: if (pipe(i) == -1) { perror("pipe"); exit(1); } is this line using some kind of c++ magic? 00:42:17 oh wait, nm, I see it 00:44:49 Umm 00:45:32 past that now.. :) 00:45:59 -!- CXI has quit (Connection timed out). 00:56:05 GregorR: where is the part of the program that you intercept a programs output and make it safe? 00:58:48 ahh, found it 00:59:39 argh.. you're buffering the output and just dealing with it in those 1.5sec intervals 01:02:50 Well, yeah. 01:03:32 say that the interpreter wants input (,) ..how is that handled? 01:04:25 does it just block on the pipe? 01:05:06 and you put data into the pipe when it is given? 01:05:11 * calamari guesses: yes 01:05:26 hmm, why can't I do the same thing? 01:06:43 hmm, where is it putting the input data into the pipe? I don't see it 01:07:57 found it! 01:08:46 hmm I guess the difference here is that the user types a command that egobot receives, saying "here is input".. but unix doesn't do that 01:09:29 I suppose I could fork again and just wait on input 01:15:06 odds of a concurrency problem are rapidly approaching 1 01:16:01 hmm maybe I can use pthread 01:20:11 no man pages? 01:20:41 ahh, finally 01:25:32 -!- GregorR has quit (Read error: 110 (Connection timed out)). 02:11:21 -!- brk3nc0nstra1nt5 has joined. 02:11:23 -!- brk3nc0nstra1nt5 has left (?). 02:12:45 -!- GregorR has joined. 02:13:12 -!- jix has left (?). 02:51:20 -!- CXII has changed nick to CXI. 03:29:50 -!- GregorR has quit (Remote closed the connection). 03:30:21 -!- GregorR has joined. 03:31:17 -!- Sgeo has joined. 03:46:23 -!- heatsink has joined. 04:39:55 -!- cmeme has quit (zelazny.freenode.net irc.freenode.net). 04:39:55 -!- twobitsprite has quit (zelazny.freenode.net irc.freenode.net). 04:39:55 -!- sekhmet has quit (zelazny.freenode.net irc.freenode.net). 04:39:57 -!- sp3tt has quit (zelazny.freenode.net irc.freenode.net). 04:39:57 -!- SimonRC has quit (zelazny.freenode.net irc.freenode.net). 04:40:00 -!- twobitsprite has joined. 04:40:00 -!- cmeme has joined. 04:40:00 -!- sekhmet has joined. 04:40:00 -!- sp3tt has joined. 04:40:00 -!- SimonRC has joined. 04:50:25 -!- GregorR_ has joined. 04:54:11 -!- Arrogant has joined. 05:11:32 -!- GregorR has quit (Read error: 110 (Connection timed out)). 05:14:09 -!- GregorR_ has changed nick to GregorR. 05:18:22 -!- CXII has joined. 05:18:35 -!- CXI has quit (Connection timed out). 06:04:52 -!- heatsink has quit ("Connection reset by sleep"). 07:02:25 -!- Arrogant has quit ("Leaving"). 07:59:59 -!- clog has quit (ended). 08:00:00 -!- clog has joined. 08:03:59 -!- calamari has quit ("Leaving"). 08:47:10 -!- GregorR has quit (Read error: 110 (Connection timed out)). 10:08:45 -!- CXII has quit (Read error: 110 (Connection timed out)). 10:30:37 -!- Sgeo has quit (Remote closed the connection). 10:33:52 -!- nooga has joined. 10:34:03 hi 10:48:27 -!- SimonRC has quit (Connection reset by peer). 10:49:22 -!- SimonRC has joined. 10:50:08 -!- SimonRC has quit (Read error: 104 (Connection reset by peer)). 10:54:21 -!- SimonRC has joined. 10:55:22 -!- SimonRC has quit (Read error: 104 (Connection reset by peer)). 10:59:24 -!- SimonRC has joined. 11:00:51 -!- SimonRC has quit (Read error: 104 (Connection reset by peer)). 11:04:23 -!- SimonRC has joined. 11:05:46 -!- SimonRC has quit (Read error: 104 (Connection reset by peer)). 11:09:24 -!- SimonRC has joined. 11:09:55 -!- SimonRC has quit (Read error: 104 (Connection reset by peer)). 11:14:23 -!- SimonRC has joined. 11:15:51 -!- SimonRC has quit (Read error: 104 (Connection reset by peer)). 11:19:23 -!- SimonRC has joined. 11:19:49 -!- SimonRC has quit (Read error: 104 (Connection reset by peer)). 11:24:24 -!- SimonRC has joined. 11:26:14 -!- SimonRC has quit (Read error: 104 (Connection reset by peer)). 11:29:24 -!- SimonRC has joined. 11:31:55 -!- SimonRC has quit (Read error: 104 (Connection reset by peer)). 11:34:25 -!- SimonRC has joined. 12:16:01 Sorry about my connection earlier. 12:16:02 The whole Uni was dropping off the net. 13:21:32 -!- SimonRC has quit (Read error: 104 (Connection reset by peer)). 13:22:23 -!- SimonRC has joined. 13:23:30 -!- SimonRC has quit (Read error: 104 (Connection reset by peer)). 13:27:24 -!- SimonRC has joined. 13:38:34 -!- jix has joined. 13:53:04 -!- nooga has quit. 13:58:58 * SimonRC goes to eat 14:27:15 -!- CXI has joined. 14:58:10 how do you pronounce "quine"? 15:26:49 http://www.auralgasms.com/default.aspx?BandID=jodyq a person called Jody Quine pronounces her name so that it rhymes with "wine" 15:27:17 and that's how I would've done it 16:41:07 -!- tokigun has quit (Remote closed the connection). 17:13:12 -!- tokigun has joined. 17:19:41 -!- tokigun has quit (Remote closed the connection). 17:46:29 -!- tokigun has joined. 17:52:08 -!- Sgeo has joined. 18:58:54 -!- jix has quit ("This computer has gone to sleep"). 20:04:43 -!- GregorR has joined. 20:33:06 -!- GregorR_ has joined. 20:40:38 -!- GregorR__ has joined. 20:46:53 -!- GregorR__ has quit (Remote closed the connection). 20:47:59 -!- GregorR__ has joined. 20:48:34 -!- GregorR has quit (Read error: 110 (Connection timed out)). 20:53:58 -!- GregorR___ has joined. 21:00:00 -!- GregorR___ has changed nick to GregorR. 21:04:16 -!- GregorR_ has quit (Read error: 110 (Connection timed out)). 21:18:13 -!- GregorR__ has quit (Read error: 110 (Connection timed out)). 21:19:54 -!- jix has joined. 21:21:47 -!- GregorR has quit (Read error: 110 (Connection timed out)). 23:09:58 -!- jix has quit ("Bitte waehlen Sie eine Beerdigungnachricht"). 23:24:00 * SimonRC goes to bed 23:24:06 -!- GregorR has joined. 23:46:55 -!- GregorR-L has joined.