Ticket #95 (closed defect: fixed)

Opened 11 years ago

Last modified 11 years ago

stdio functions and missing ExecuteResponse

Reported by: Knut Landmark Owned by:
Priority: major Milestone:
Component: zoo-kernel Version:
Keywords: Cc:

Description (last modified by landmark) (diff)

The standard stdio functions are shadowed by the fcgi_stdio functions in some but not all parts of the ZOO kernel. As tested on Windows, running a service (e.g. longProcess) with storeExecuteResponse=true and status=true may fail because the ExecuteResponse? is not written to the temporary <service>_final_<pid>.xml file via redirection of stdout. Putting #include "cgic.h" in service_internal.h resolved this problem.

Update: In some services it may be necessary to use standard stdio. For example, Visual C++ has a superset of wide character print functions, not redefined in fcgi_stdio.h, that take FILE* as a parameter (not FCGI_FILE*). This can easily be resolved by putting #define NO_FCGI_DEFINES at the beginning of the service source code.

Change History

  Changed 11 years ago by landmark

  • component changed from Development platform to zoo-kernel

follow-up: ↓ 4   Changed 11 years ago by djay

You can see here the modification made here: ref. let me know if it solve the issue this way.

  Changed 11 years ago by landmark

  • description modified (diff)

in reply to: ↑ 2 ; follow-up: ↓ 5   Changed 11 years ago by landmark

Replying to djay:

You can see here the modification made here: ref. let me know if it solve the issue this way.

Yes, this seems to have solved the issue. It has also solved a problem with fprintf(stderr, ...) statements causing crashes.

in reply to: ↑ 4   Changed 11 years ago by djay

  • status changed from new to closed
  • resolution set to fixed

Replying to landmark:

Replying to djay:

You can see here the modification made here: ref. let me know if it solve the issue this way.

Yes, this seems to have solved the issue. It has also solved a problem with fprintf(stderr, ...) statements causing crashes.

Thanks for you answer. So I can close the ticket. Nevertheless, for the record I also noticed that the FatsCGI version is now working. There is still some limitations in its use for some programming languages (I am fighting with Python for days now and removed many leaks already) but looks to work fine for C based services. Note that I didn't try yet the FastCGI version on windows but I will do later on for sure. If you give it a try do not hesitate to send feedbacks.

Note: See TracTickets for help on using tickets.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png