I wrapped my R script /usr/lib/R/bin/exec/R to limit memory usage: I renamed it to /usr/lib/R/bin/exec/R_orig and then created a bash script named /usr/lib/R/bin/exec/R with the content:#!/bin/bashecho Memory limited to 10Gulimit -Sv 10000000 #limit memory for 64-bit version/usr/lib/R/bin/exec/R_orig $@This is a huge improvement of my experience with that particular program, but I discovered that some parts of it actually use the executable name to determine package installation paths, and since the executable name is modified, they fail.Is it possible to make my script /usr/lib/R/bin/exec/R to be seen as the executable by itself - so that for example top does not show a separate child process R_orig, but only the process R?
How to wrap a command so that a script rather than its child appears as the executable?
bash;process