> I can not seem to find the secret for making system calls.
>
> If I use a callback functions for a button
> and do system("who");
> the output goes to stdio. ( the active win )
Do a popen() instead of calling system():
FILE *f;
char buffer[80];
[...]
f = popen( "who", "r" );
while ( fgets( buffer, 80, f ) )
do_your_thing( buffer );
pclose( f ); /* fclose() also works but isn't as kosher */
spl