73,6 → 73,9 |
|
int main(int argc, char *argv[]) |
{ |
task_exit_t texit; |
int retval; |
|
if (argc < 3) { |
usage(); |
return -1; |
83,6 → 86,12 |
stdin = fopen(argv[1], "r"); |
stdout = fopen(argv[1], "w"); |
stderr = fopen(argv[1], "w"); |
|
/* |
* FIXME: fopen() should actually detect that we are opening a console |
* and it should set line-buffering mode automatically. |
*/ |
setvbuf(stdout, NULL, _IOLBF, BUFSIZ); |
|
if ((stdin == NULL) |
|| (stdout == NULL) |
91,7 → 100,7 |
|
version_print(argv[1]); |
task_id_t id = spawn(argv[2]); |
task_wait(id); |
task_wait(id, &texit, &retval); |
|
return 0; |
} |