Ticket #1203: fix_retval_of_read_stderr_file.diff
File fix_retval_of_read_stderr_file.diff, 900 bytes (added by , 12 years ago) |
---|
-
client/app_control.cpp
818 818 int ACTIVE_TASK::read_stderr_file() { 819 819 char* buf1, *buf2; 820 820 char path[MAXPATHLEN]; 821 int retval; 821 822 822 823 // truncate stderr output to the last 63KB; 823 824 // it's unlikely that more than that will be useful … … 825 826 int max_len = 63*1024; 826 827 sprintf(path, "%s/%s", slot_dir, STDERR_FILE); 827 828 if (!boinc_file_exists(path)) return 0; 828 if (read_file_malloc(path, buf1, max_len, !config.stderr_head)) { 829 return ERR_MALLOC;830 }829 830 retval = read_file_malloc(path, buf1, max_len, !config.stderr_head) 831 if (retval) return retval; 831 832 832 833 // if it's a vbox app, check for string in stderr saying 833 834 // the job failed because CPU VM extensions disabled