[AD] [LNX] Allegro and popen() |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
Allegro doens't work well with others...
I've been trying to use popen to get the output of another program... but
once allegro_init() is called popen just hangs.
example:
#include <unistd.h>
#include <stdio.h>
#include <allegro.h>
int main()
{
FILE *f = NULL;
char line[1024];
allegro_init();
memset(line, 0, 1024);
f = popen("ls -l ~/", "r");
while(fgets(line, 1024, f)!=NULL) {
printf("%s", line);
memset(line, 0, 1024);
}
}END_OF_MAIN();
--
Thomas Fjellstrom
tfjellstrom@xxxxxxxxxx
http://strangesoft.net