Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

system(3) [ultrix man page]

system(3)						     Library Functions Manual							 system(3)

Name
       system - issue a shell command

Syntax
       system(string)
       char *string;

Description
       If  the	string	argument  is the NULL pointer (0) the function tests the accessibility of the command interpreter The function will return
       zero for failure to find the command interpreter, and positive if successful.

       If the string argument is non-NULL the routine causes the string to be given to 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 in the form that returns.

Diagnostics
       Exit status 127 indicates the shell couldn't be executed.

See Also
       execve(2), wait(2), popen(3)

																	 system(3)

Check Out this Related Man Page

SYSTEM(3)						   BSD Library Functions Manual 						 SYSTEM(3)

NAME
system -- pass a command to the shell LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <stdlib.h> int system(const char *string); DESCRIPTION
The system() function hands the argument string to the command interpreter sh(1). The calling process waits for the shell to finish execut- ing the command, ignoring SIGINT and SIGQUIT, and blocking SIGCHLD. If string is a NULL pointer, system() will return non-zero if the command interpreter sh(1) is available, and zero if it is not. RETURN VALUES
The system() function returns the exit status of the shell as returned by waitpid(2), or -1 if an error occurred when invoking fork(2) or waitpid(2). A return value of 127 means the execution of the shell failed. SEE ALSO
sh(1), execve(2), fork(2), waitpid(2), popen(3) STANDARDS
The system() function conforms to ISO/IEC 9899:1990 (``ISO C90'') and is expected to be IEEE Std 1003.2 (``POSIX.2'') compatible. BSD
June 4, 1993 BSD
Man Page

7 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Information about Unix System Administration

I'm a newbie so I'm not sure if I'm posting this in the right section... if I didn't, please forgive me :) I've been looking all over the web for information on system administration. I'd like to become a Unix System Administrator but I want to find some more info about the job. Can someone please... (54 Replies)
Discussion started by: hpicracing
54 Replies

2. Filesystems, Disks and Memory

QEMU not booting my image

hello all, I have been trying to boot an image (.IMG) using qemu, for quite some time now and i can't seem to get it to work. I've been able to boot from the Windows XP CD, the Debian iso image, etc, so I know qemu is configured properly and is working. But when it come to booting an image that I... (34 Replies)
Discussion started by: neur0n
34 Replies

3. What is on Your Mind?

What do you do for a living?

(107 Replies)
Discussion started by: ilikecows
107 Replies

4. UNIX for Beginners Questions & Answers

How Do I FTP System Files to Different Server?

Hello, I have a legacy system that is running on SCO OpenServer 5.0.6, and the hardware is becoming a little sketchy. I replaced the hard drive about a year ago, and was able to come back from a tape backup of my entire system. I have been successful with building a VM with VMware Workstation,... (42 Replies)
Discussion started by: spock9458
42 Replies

5. What is on Your Mind?

New Badging System - Badges Prototype Beta 1 (Badges Only)

Today I mapped out the new badging system using FA icons, Beta 1 in no particular order except a 6 x 8 grid: https://www.unix.com/members/1-albums215-picture991.png The prototype HTML code for this layout: <style> .fa-badge-grid { font-size: 1.5em; } .row { ... (38 Replies)
Discussion started by: Neo
38 Replies

6. Web Development

Notes with Ravinder on Badging System Development Part II

Part II: Current PHP file Beta 73 Not Optimized: <?php $version = 73; $query = "SELECT * FROM " . TABLE_PREFIX . "user WHERE userid='" . $uid . "'"; $usertable = $db->query_read_slave($query); $modaluser = $db->fetch_array($usertable); $modaluser = gmdate("d F Y", $modaluser); $modaluser... (48 Replies)
Discussion started by: Neo
48 Replies

7. Open Source

What is your favorite Linux distro?

What is your favorite Linux distro? and possibly why? Personally, I have Fedora 3 on my computer. I have used Ubuntu and Slackware, too. But I think I liked Ubuntu more, maybe because of its speed and easy installation of packages. (192 Replies)
Discussion started by: milhan
192 Replies