Dear Bash developers, May I ask for a small feature to be added to bash?
At the moment exec changes IO redirections for the newly started processes, but if there is no command for exec'ing, it changes those redirections for the bash process itself. The exec -a, however, allows setting the current process title (argv0) only for the newly exec'ed processes, and "exec -a whatever" (without a command) does nothing. However it seems to be possible (albeit in a series of 8 syscalls) to change the _current_ process' cmdline and argv0: 1. https://unix.stackexchange.com/a/438007/541470 2. https://github.com/jdebp/nosh/blob/master/source/setprocargv.cpp 3. https://github.com/jdebp/nosh/blob/master/source/setprocenvv.cpp Would it be possible to add this behaviour to the "exec" bash builtin? Thank you and sorry if this is too much to ask. -- Your sincerely, Vladimir Nikishkin (MiEr, lockywolf) (Laptop)