What means Pipe failed, too many files opened?
i am running a code and created a pipe. When i compile it and run it says that "pipe failed, too many files opened"
Does anyone know what does this mean? |
It means that you have too many open files for your user or program’s permissions…
pipe() probably failed with EMFILE. To correct this, you to change your resource limits (specifically RLIMIT_NOFILE). |
Dear osor
I have created a pipe and then forked the procedure, but it tells me that piped failed and has too many open files. I think that this response comes because fd[0] element opens too many files for reading and the system memory is too low. When i am using less files the procedure works fine I wander how you change your resource limits, and what is RLIMIT_NOFILE() in order the pipe to read the files? i give you a part of the pipe process int i; int status; int pid[2]; int pipe_fd[2]; for(i = 0; i < n; i++) { strcpy(name,uncompressed[i]->d_name); if (pipe(pipe_fd) < 0) { perror ("pipe failed"); exit (errno);I realy think that the process ends here if ((pid[0]=fork()) < 0) { perror ("Fork failed"); exit(errno); |
Quote:
Quote:
There are many reasons why your resource limits might be too low. The most common culprit is PAM. A quick google might get you started. |
|
All times are GMT -5. The time now is 11:01 PM. |