Search
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Backport193
All Projects
Ruby meta
»
Backport193
Overview
Activity
Issues
Like
Download (414 Bytes)
Backport #5723
ยป main.cpp
linux c source -
rdmoore (Randal Moore)
, 12/08/2011 01:48 AM
#include
<cstdlib>
#include
<unistd.h>
int
main
(
int
argc
,
const
char
*
argv
[])
{
long
pid
=
fork
();
//child
if
(
pid
==
0
)
{
close
(
0
);
// close std in
char
*
args
[]
=
{
"ruby"
,
"-e"
,
"puts 'hello world'"
,
0
};
execvp
(
"ruby"
,
(
char
*
const
*
)
args
);
exit
(
0
);
}
return
0
;
}
(1-1/1)
Loading...