[lkml]   [2006]   [Sep]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subjectsuggestion about rlimit for number of open file descriptions
I came across a problem regarding the issue of number of open
file descriptors.The scenario is as below.
I have a controlling process which launches other different
apllication including third party ones. It also enforces various
resource limits including number of open file descriptors. This
process forks & reads the resource limits from a configuration files,
applies the resource limits & then execs for the corresponding
application. The process has its own various number of open file
descriptors. If the limit of open file descriptor for the child
application is less than the number of file descriptors of the parent
process, then the child application file can not be opened & exec
fails in this case.

I searched solution for this problem but could not find an existing
way to solve it. I thought of couple of ways to do it. One idea is to
create another flag for clone which makes it not to inherit the open
file descriptors & use clone with that flag instead of fork .The other
approach is to create a new system call & parent process can call that
system call before calling the setrlimit.

I am looking for your opinion which is the better way or if there is
some other better way. Further if this is generic enough issue then I
can submit the patch.

Ram Gupta
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2006-09-09 01:41    [W:0.021 / U:5.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site