Changeset 631 for trunk/zoo-project/zoo-kernel/zoo_service_loader.c
- Timestamp:
- Apr 13, 2015, 8:17:18 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-project/zoo-kernel/zoo_service_loader.c
r621 r631 1968 1968 if (lid < 0) 1969 1969 { 1970 fprintf (stderr, "ERROR %s %d\n", __FILE__, __LINE__); 1971 fflush (stderr); 1972 return -1; 1970 return errorException (m, _("Lock failed"), 1971 "InternalError", NULL); 1973 1972 } 1974 1973 else … … 1976 1975 if (lockShm (lid) < 0) 1977 1976 { 1978 fprintf (stderr, "ERROR %s %d\n", __FILE__, __LINE__); 1979 fflush (stderr); 1980 return -1; 1977 return errorException (m, _("Lock failed"), 1978 "InternalError", NULL); 1981 1979 } 1982 fflush (stderr);1983 1980 } 1984 1981 f0 = freopen (fbkp, "w+", stdout); … … 1987 1984 fclose (stdin); 1988 1985 #endif 1986 1987 /** 1988 * set status to SERVICE_STARTED and flush stdout to ensure full 1989 * content was outputed (the file used to store the ResponseDocument). 1990 * The rewind stdout to restart writing from the bgining of the file, 1991 * this way the data will be updated at the end of the process run. 1992 */ 1993 printProcessResponse (m, request_inputs, cpid, s1, r_inputs1->value, 1994 SERVICE_STARTED, request_input_real_format, 1995 request_output_real_format); 1996 fflush (stdout); 1997 unlockShm (lid); 1998 fflush (stderr); 1999 fbkp1 = 2000 (char *) 2001 malloc ((strlen (r_inputs->value) + strlen (r_inputs1->value) + 2002 1024) * sizeof (char)); 2003 sprintf (fbkp1, "%s/%s_final_%d.xml", r_inputs->value, 2004 r_inputs1->value, cpid); 2005 2006 f1 = freopen (fbkp1, "w+", stdout); 1989 2007 free (flog); 2008 1990 2009 if(validateRequest(&m,s1,request_inputs, &request_input_real_format,&request_output_real_format,&hInternet)<0){ 1991 2010 freeService (&s1); … … 2006 2025 return -1; 2007 2026 } 2008 /**2009 * set status to SERVICE_STARTED and flush stdout to ensure full2010 * content was outputed (the file used to store the ResponseDocument).2011 * The rewind stdout to restart writing from the bgining of the file,2012 * this way the data will be updated at the end of the process run.2013 */2014 printProcessResponse (m, request_inputs, cpid, s1, r_inputs1->value,2015 SERVICE_STARTED, request_input_real_format,2016 request_output_real_format);2017 fflush (stdout);2018 unlockShm (lid);2019 fflush (stderr);2020 fbkp1 =2021 (char *)2022 malloc ((strlen (r_inputs->value) + strlen (r_inputs1->value) +2023 1024) * sizeof (char));2024 sprintf (fbkp1, "%s/%s_final_%d.xml", r_inputs->value,2025 r_inputs1->value, cpid);2026 f1 = freopen (fbkp1, "w+", stdout);2027 2027 loadServiceAndRun (&m, s1, request_inputs, 2028 2028 &request_input_real_format, 2029 2029 &request_output_real_format, &eres); 2030 2030 2031 } 2031 2032 else
Note: See TracChangeset
for help on using the changeset viewer.