Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

system(3) [v7 man page]

SYSTEM(3)						     Library Functions Manual							 SYSTEM(3)

NAME
system - issue a shell command SYNOPSIS
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. SEE ALSO
popen(3), exec(2), wait(2) DIAGNOSTICS
Exit status 127 indicates the shell couldn't be executed. 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 is available, or zero if none is available. Other- wise, system() returns the termination status of the shell in the format specified by waitpid(2). RETURN VALUES
If a child process cannot be created, or the termination status of the shell cannot be obtained, system() returns -1 and sets errno to indi- cate the error. If execution of the shell fails, system() returns the termination status for a program that terminates with a call of exit(127). SEE ALSO
sh(1), execve(2), waitpid(2), popen(3), shquote(3) STANDARDS
The system() function conforms to ANSI X3.159-1989 (``ANSI C89'') and IEEE Std 1003.2-1992 (``POSIX.2''). CAVEATS
Never supply the system() function with a command containing any part of an unsanitized user-supplied string. Shell meta-characters present will be honored by the sh(1) command interpreter. BSD
August 2, 2007 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