Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] console broken when using 'select' ?

Hi all,

I've just installed Eclipse and CDT and i'm very impressed! so much nicer than just using the commandline! ;-)

I created a little c program (hello world), which used printf to print the famous text, and then exit. That worked fine and the console neatly showed "Hellow world!" in blue.

But now that i've imported my game server (the reason i installed CDT) into eclipse, the console doesn't really behave as expected.

My game server is rather standard, in that it opens a listening socket, then jumps into a 'select'. When new connections are made, they are accepted and added to the master fd_set, and it jumps back in to the 'select' to wait for incoming data on any of the connected sockets.

The server builds fine under eclipse, and the resulting binary runs fine on its own. However... when i run it inside eclipse, things dont really work.

There are a few printf's prior to going in to the 'select', but they never show on the console. Also, clients that connect to the server seem to get garbage and the server terminates quickly after that. If I put an exit just prior to the 'select' i _do_ see the printf's.

It seems something odd is going on when it hits that 'select' statement. I have no idea what though.

Would anyone have an idea? (Or is this the wrong mailing list for this type of question?)

[someone mentioned the console needs to get flushed? but i have no idea how, where or what ;-)]

/Cheers,
Jelte



Back to the top