cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
UNIX/Linux Programming
Will this program succeed in forking 10
Will this program succeed in forking 10 times?
Mar 10, 2013 at 12:25am UTC
mrpeed
(13)
timeToFork = 10;
for(int i = 0; i < timesToFork; ++i) {
pid = fork();
if(pid == -1) {
perror("Failed to fork.");
exit();
}
}
After 10 times will I reside in the 10th process?
Mar 10, 2013 at 3:57am UTC
ne555
(10692)
Duplicated thread
http://cplusplus.com/forum/general/95160/
Topic archived. No new replies allowed.