Wrapper

From ISPWiki
Jump to: navigation, search

All binary files in sbin are links to the wrapper file. Thus, COREmanager doesn't depend on pre-installed libraries, and uses the libraries we provide with it. wrapper enables to set the LD_LIBRARY_PATH environment variable, upload the corresponding .so file from the libexec directory, and execute the ispmain command, which semantics fully matches the standard function main.

wrapper performs the following operations:

  • set the LD_LIBRARY_PATH environment variable into external:lib
  • defines and opens the program directory that will be used (the one containing the libexec and sbin directories).
  • uploads the coresponding .so file from libexec (i.e. if your executable file is called dummy, the libexec/dummy.so file will be uploaded)
  • executes the ispmain function and pass parameters retrieved by the main function.

wrapper will answer if the -T key is specified in the command line. If all the libraries have been uploaded successfully, UPDATE_CONTROL_STRING will be sent to STDOUT rather than calling ispmain. This is a macro described in the ispbin.h file. Otherwise, the error message will be displayed. This helps to check that the program is up and running after update.

All the information above is given only for Unix systems, in Windows it is not used.

ispmain

COREmanager contains the ispbin.h file, which described the ISP_MAIN macro. We recommend using this macro rather then specifying ispmain.