ssyysstteemm() -- General Function (libc)

Pass a command to the shell for execution
#iinncclluuddee <ssttddlliibb.hh>
iinntt ssyysstteemm(_c_o_m_m_a_n_d_l_i_n_e) cchhaarr *_c_o_m_m_a_n_d_l_i_n_e;

ssyysstteemm() passes _c_o_m_m_a_n_d_l_i_n_e to the shell sshh, which loads it into memory and
executes it.  ssyysstteemm() executes commands  exactly as if they had been typed
directly into  the shell.   ssyysstteemm() may  be used by  commands such  as eedd,
which can  pass commands  to the COHERENT  shell in addition  to processing
normal interactive requests.

_E_x_a_m_p_l_e
This example  uses ssyysstteemm to  list the names  of all C source  files in the
parent directory.

#include <stdio.h>
#include <stdlib.h>

main()
{
    system("cd .. ; ls *.c > mytemp; cat mytemp");
}

_S_e_e _A_l_s_o
eexxeecc, ffoorrkk(), lliibbcc, ppooppeenn(), ssttddlliibb.hh, wwaaiitt()
ANSI Standard, section 7.10.4.5

_D_i_a_g_n_o_s_t_i_c_s
ssyysstteemm()  returns the  exit  status of  the  child process,  in the  format
described in  wwaaiitt(): exit status  in the high byte,  signal information in
the low byte.  Zero  normally means success, whereas nonzero normally means
failure.   This, however,  depends  on the  _c_o_m_m_a_n_d.  If the  shell is  not
executable, ssyysstteemm() returns a special code of octal 0177.
