876_____________________________________________ 14

   0     , 
   -1.       (. -
 14.5.1)    EACCES    ,
EMFILE     , ENOENT     
, ENOEXEC   , ENOMEM    .

 . 

iffexecl("FI.exe","FI.exe", NULL))
ShowMessage(" FI.exe  ");

        
 FI.exe.        . 
 excel  -1      ShowMessage. -
    , ,   FI.exe  
 .


execlp("nc","nc",NULL);

   Norton Commander ( .),  
        PATH.


char * prog = "command.corn";

execlp(prog,prog, NULL);

  DOS,      command.corn   -
  PATH.


execlp("Winword","Winword","F.doc",NULL))

  Word      F.doc.
  Word   :

char *arg[5] = {"Winword"); //     
arg[l] = "Fl.doc";

arg[2] = "F2.doc";

execvp(arg[0],arg) ;

  arg         
 Winword,        -
  NULL.       1  2  
  Word .      NULL. 
  execvp    Winword   
   .

,    spawn...,   -
,     : cwait  wait.

 wait     
  .  ,    -
       .

  statloc  wait  NULL,     , -
     .   
     :

 0-7 

 8-15      .   -
,      exit   
return  main.     
main   return,      