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

Sascha Wildner swildner at crater.dragonflybsd.org
Fri Mar 3 18:04:20 PST 2023


commit 603a365a58e57425a6c4d28705ff5abf87673a7f
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/603a365a58e57425a6c4d28705ff5abf87673a7f


-- 
DragonFly BSD source repository


More information about the Commits mailing list