system

Executes operating system commands

Local Servers:blocking
Remote Servers:N/A
Classification:ANSI
NetWare Server:3.x, 4.x, 5.x, 6.x
Service:Thread

Syntax

  #include <stdlib.h>  
  #include <nwthread.h> 
   
  int  system  (  
     const char   *command); 
  

Parameters

command
(IN) Points to a command to execute.

Return Values

If successful in passing the command to the operating system, returns 0. Any errors in executing the operating system commands are shown on the system console screen.

If the command string is longer than 512 characters, returns -1 and sets errno to the following:

Decimal

Constant

Description

65

ENAMETOOLONG

The command parameter exceeds the maximum length of 512 characters.

Remarks

This function always echoes input directly to the system console screen. Errors in executing the operating system command are shown on the system console screen.

NOTE:If the console operator is typing, your string will be intermixed with the input from the console operator.

See Also

abort, atexit, exit, _exit, spawnlp, spawnvp

Example

  #include <stdio.h>  
  #include <stdlib.h>  
  #include <nwthread.h>  
   
  /*————*/  
  main ()  
  {  
     .  
     .  
     .  
     system ("LOAD MONITOR");  
     .  
     .  
     .  
  }  
  /*————*/