avoid exiting directly if file not found

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@567 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
bellard 2004-01-18 22:55:23 +00:00
parent 985a19d6d1
commit c27357906a

View File

@ -1284,14 +1284,9 @@ int elf_exec(const char * filename, char ** argv, char ** envp,
for (i=0 ; i<MAX_ARG_PAGES ; i++) /* clear page-table */
bprm.page[i] = 0;
retval = open(filename, O_RDONLY);
if (retval == -1) {
perror(filename);
exit(-1);
/* return retval; */
}
else {
if (retval < 0)
return retval;
bprm.fd = retval;
}
bprm.filename = (char *)filename;
bprm.sh_bang = 0;
bprm.loader = 0;