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
Error in using popen
Error in using popen
Apr 27, 2009 at 10:03am UTC
vijkrr
(86)
hi
I'm using one popen function, via that i'm executing the unix commands. The Popen function is failling when it get called on 251 st time. Here is the code.
FILE *in=NULL;
in=popen("ls -l | wc -l", "r");
if(in == NULL)
{
cout<<" ERROR IN GETTING DIR LIST1 "<<endl;
exit(0) ;
}
else
cout<<"Success "<<endl;
can any one help me in this..
Apr 27, 2009 at 11:17am UTC
kbw
(9488)
It sounds like you've run out of file handles.
Apr 27, 2009 at 11:48am UTC
vijkrr
(86)
i fixed the issue. i didnt close the opened IO's..
Topic archived. No new replies allowed.