[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference star::wizards

Title: "ASK THE WIZARDS"
Moderator:QUARK::LIONEL
Created:Mon Oct 30 1995
Last Modified:Mon May 12 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:1857
Total number of notes:3728

1430.0. "Open: problem with "system" function in C" by STAR::JKEENAN () Thu Jan 16 1997 08:59

T.RTitleUserPersonal
Name
DateLines
1430.1SS$_NOCLIXDELTA::HOFFMANSteve, OpenVMS EngineeringMon Feb 03 1997 15:2819
In using the "system" function in a C written program, I cannot get the system
call to work with a detached process.

   In a detached process, there is no CLI present by default, hence there
   is no way for LIB$SPAWN or system() to operate.

   See the OpenVMS Frequently Asked Questions (FAQ) section entitled
   "DCL1.   How do I run a program with arguments?" section for some
   additionaol details and suggestions.

:The debug statements to write out the status show a value of 1 (SUCCESS) 
:when run from a spawn command or an interactive session but it shows
:0 (FAIL) when is run from a detach process.

   Check the error status and system-error-status values returned via
   C -- I'd expect to see the SS$_NOCLI value in the platform error
   code cell.