rlimit(RLIMIT_NOFILE): return one less to make sure sync pipe can be created (LTP fork09)
This commit is contained in:
@ -2330,6 +2330,12 @@ SYSCALL_DECLARE(getrlimit)
|
|||||||
case RLIMIT_NOFILE:
|
case RLIMIT_NOFILE:
|
||||||
/* just forward */
|
/* just forward */
|
||||||
ret = syscall_generic_forwarding(n, ctx);
|
ret = syscall_generic_forwarding(n, ctx);
|
||||||
|
|
||||||
|
/* return one less than the actual value to make sure mcexec can open
|
||||||
|
* its temporary synchronization pipe when a new process is forked */
|
||||||
|
if (resource == RLIMIT_NOFILE) {
|
||||||
|
ret -= 1;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|||||||
Reference in New Issue
Block a user