FILE *input;
int status;
- input = bb_wfopen(child->argv[1], "r");
+ input = fopen_or_warn(child->argv[1], "r");
if (!input) {
return EXIT_FAILURE;
}
if (!fgets(command, BUFSIZ - 2, source)) {
if (source == stdin)
- printf("\n");
+ puts("");
return 1;
}
/* Check if the command matches any of the forking builtins. */
for (x = bltins_forking; x->cmd; x++) {
if (strcmp(child->argv[0], x->cmd) == 0) {
- bb_applet_name=x->cmd;
+ applet_name=x->cmd;
_exit (x->function(child));
}
}
llist_add_to(&close_me_list, (void *)(long)fileno(prof_input));
/* Now run the file */
busy_loop(prof_input);
- bb_fclose_nonstdin(prof_input);
+ fclose_if_not_stdin(prof_input);
llist_pop(&close_me_list);
}
}