summaryrefslogtreecommitdiff
path: root/src/setproctitle.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix failed tests on Linux Alpine and add a CI job. (#8532)Yossi Gottlieb2021-02-231-1/+1
| | | | | | | | | | | | | | | | | | | * Remove linux/version.h dependency. This introduces unnecessary dependencies, and generally not a good idea as the platform we build on may be different than the platform we run on. To determine if sync_file_range exists we can simply rely on header file hints. * Fix setproctitle() on libmusl. The previous ifdef checks were a bit too strict for no apparent reason. * Fix tests failure on Linux with no backtrace. * Add alpine daily CI job.
* Fix setproctitle related crashes. (#8150)Yossi Gottlieb2020-12-081-4/+39
| | | | | Makes spt_init more careful with assumptions about what memory regions may be overwritten. It will now only consider a contiguous block of argv and envp elements and mind any gaps.
* Fix use-after-free issue in spt_copyenv. (#8088)Yossi Gottlieb2020-11-241-19/+50
| | | | | | | Seems to have gone unnoticed for a long time, because at least with glibc it will only be triggered if setenv() was called before spt_init, which Redis doesn't. Fixes #8064.
* DragonFlyBSD little build fixDavid Carlier2018-11-111-1/+1
|
* Fix undefined behavior constant defined.David Carlier2017-11-191-1/+5
|
* Set proctitle: avoid the use of __attribute__((constructor)).Stam He2013-02-271-4/+6
| | | | | | | | | | | | This cased a segfault in some Linux system and was GCC-specific. Commit modified by @antirez: 1) Stripped away the part to set the proc title via config for now. 2) Handle initialization of setproctitle only when the replacement is used. 3) Don't require GCC now that the attribute constructor is no longer used.
* setproctitle.c: declar tmp as static so valgrind will not detect a leak.antirez2013-02-261-1/+1
|
* Set process name in ps output to make operations safer.antirez2013-02-261-0/+259
This commit allows Redis to set a process name that includes the binding address and the port number in order to make operations simpler. Redis children processes doing AOF rewrites or RDB saving change the name into redis-aof-rewrite and redis-rdb-bgsave respectively. This in general makes harder to kill the wrong process because of an error and makes simpler to identify saving children. This feature was suggested by Arnaud GRANAL in the Redis Google Group, Arnaud also pointed me to the setproctitle.c implementation includeed in this commit. This feature should work on all the Linux, OSX, and all the three major BSD systems.