[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Feature request: process title with exec -a "" for oneself
From: |
Lockywolf |
Subject: |
Feature request: process title with exec -a "" for oneself |
Date: |
Sun, 01 Sep 2024 10:43:17 +0800 |
User-agent: |
mu4e 1.10.7; emacs 30.0.50 |
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)
- Feature request: process title with exec -a "" for oneself,
Lockywolf <=