Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ system(3s) — DG/UX 4.30

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

sh(1)

exec(2)



     system(3s)                 DG/UX 4.30                  system(3s)



     NAME
          system - issue a shell command

     SYNOPSIS
          #include <stdio.h>

          int system (string)
          char *string;

     DESCRIPTION
          system causes the string to be given to sh(1) as input, as
          if the string had been typed as a command at a terminal.
          The current process waits until the shell has completed,
          then returns the exit status of the shell shifted left 8
          bits (for example, if the shell exits with a value of 4, the
          return value is 1024, or 4 << 8).

     FILES
          /bin/sh

     SEE ALSO
          sh(1), exec(2).

     DIAGNOSTICS
          system forks to create a child process that in turn calls
          exec to execute /bin/sh.  This shell then executes string.
          If the fork or exec fails, system returns a negative value
          and sets errno.



























     Licensed material--property of copyright holder(s)         Page 1



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026