Can `su` preserve resource limits?

Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
I am under user t and then switch to t again via su t:
$ ulimit -c -H; ulimit -c
1000
1000
$ su t
Password:
$ ulimit -c -H; ulimit -c
unlimited
0
Is it possible to request su to preserve resource limit, just like sudo which can:
$ ulimit -c -H; ulimit -c
1000
1000
$ sudo bash -c "ulimit -c -H; ulimit -c"
1000
1000
Thanks.
Here I am trying to find a solution to make https://unix.stackexchange.com/a/446811/674 work.
su shadow-utils
add a comment |Â
up vote
1
down vote
favorite
I am under user t and then switch to t again via su t:
$ ulimit -c -H; ulimit -c
1000
1000
$ su t
Password:
$ ulimit -c -H; ulimit -c
unlimited
0
Is it possible to request su to preserve resource limit, just like sudo which can:
$ ulimit -c -H; ulimit -c
1000
1000
$ sudo bash -c "ulimit -c -H; ulimit -c"
1000
1000
Thanks.
Here I am trying to find a solution to make https://unix.stackexchange.com/a/446811/674 work.
su shadow-utils
I think it won't work. It only applies to subshells.
â Rui F Ribeiro
May 30 at 2:56
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I am under user t and then switch to t again via su t:
$ ulimit -c -H; ulimit -c
1000
1000
$ su t
Password:
$ ulimit -c -H; ulimit -c
unlimited
0
Is it possible to request su to preserve resource limit, just like sudo which can:
$ ulimit -c -H; ulimit -c
1000
1000
$ sudo bash -c "ulimit -c -H; ulimit -c"
1000
1000
Thanks.
Here I am trying to find a solution to make https://unix.stackexchange.com/a/446811/674 work.
su shadow-utils
I am under user t and then switch to t again via su t:
$ ulimit -c -H; ulimit -c
1000
1000
$ su t
Password:
$ ulimit -c -H; ulimit -c
unlimited
0
Is it possible to request su to preserve resource limit, just like sudo which can:
$ ulimit -c -H; ulimit -c
1000
1000
$ sudo bash -c "ulimit -c -H; ulimit -c"
1000
1000
Thanks.
Here I am trying to find a solution to make https://unix.stackexchange.com/a/446811/674 work.
su shadow-utils
asked May 30 at 1:23
Tim
22.6k61222401
22.6k61222401
I think it won't work. It only applies to subshells.
â Rui F Ribeiro
May 30 at 2:56
add a comment |Â
I think it won't work. It only applies to subshells.
â Rui F Ribeiro
May 30 at 2:56
I think it won't work. It only applies to subshells.
â Rui F Ribeiro
May 30 at 2:56
I think it won't work. It only applies to subshells.
â Rui F Ribeiro
May 30 at 2:56
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f446819%2fcan-su-preserve-resource-limits%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
I think it won't work. It only applies to subshells.
â Rui F Ribeiro
May 30 at 2:56