31 lines
		
	
	
		
			593 B
		
	
	
	
		
			Groff
		
	
	
	
	
	
			
		
		
	
	
			31 lines
		
	
	
		
			593 B
		
	
	
	
		
			Groff
		
	
	
	
	
	
| .\"	@(#)system.3	6.1 (Berkeley) 5/15/85
 | |
| .\"
 | |
| .TH SYSTEM 3 "May 15, 1985"
 | |
| .AT 3
 | |
| .SH NAME
 | |
| system \- issue a shell command
 | |
| .SH SYNOPSIS
 | |
| .nf
 | |
| .ft B
 | |
| #include <stdlib.h>
 | |
| 
 | |
| int system(const char *\fIstring\fP)
 | |
| .fi
 | |
| .SH DESCRIPTION
 | |
| .B System
 | |
| causes the
 | |
| .I string
 | |
| to be given to
 | |
| .BR  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.
 | |
| .SH "SEE ALSO"
 | |
| .BR sh (1),
 | |
| .BR popen (3),
 | |
| .BR execve (2),
 | |
| .BR wait (2).
 | |
| .SH DIAGNOSTICS
 | |
| Exit status 127 indicates the shell couldn't be executed.
 | 
