git: libc/ukp_setproctitle: Properly handle skipping the executable's name.

Sascha Wildner swildner at crater.dragonflybsd.org
Fri Mar 3 18:02:55 PST 2023


commit b866b1dac9e41035fffd5f4cec3b0a24a95916b6
Author: Sascha Wildner <saw at online.de>
Date:   Sat Mar 4 03:02:43 2023 +0100

    libc/ukp_setproctitle: Properly handle skipping the executable's name.
    
    If fmt begins with a "-" character, the executable's name should be
    skipped. Our fast version of setproctitle() - which is used after the
    10th call to setproctitle() - was not handling that correctly.
    
    While here, fix the case where NULL is passed to setproctitle(), which
    restores the process title to its original value. Just defer back to
    setproctitle() in this case. Thanks to aly for catching that.
    
    Dragonfly-bug: <https://bugs.dragonflybsd.org/issues/3319>

Summary of changes:
 lib/libc/upmap/ukp_setproctitle.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/b866b1dac9e41035fffd5f4cec3b0a24a95916b6


-- 
DragonFly BSD source repository


More information about the Commits mailing list