History log of /libuv/src/unix/proctitle.c (Results 1 – 24 of 24)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# c2589424 02-Dec-2020 Shuowang (Wayne) Zhang

zos: use custom proctitle implementation

ZOSLIB uses `argv[0]` to determine the exepath. So it is necessary to
use an implementation of proctitle that does not modify `argv[0]`. Since

zos: use custom proctitle implementation

ZOSLIB uses `argv[0]` to determine the exepath. So it is necessary to
use an implementation of proctitle that does not modify `argv[0]`. Since
there is currently no support for process titles on z/OS, the custom
proctitle implementation simply stores the desired title in memory.

This resolves failure in tests `get_currentexe` and `process_title` on
z/OS.

PR-URL: https://github.com/libuv/libuv/pull/3060
Reviewed-By: Richard Lau <rlau@redhat.com>

show more ...


# 9c6cec80 12-Oct-2020 Momtchil Momtchev

linux,macos: fix uv_set_process_title regression

The call to `uv__set_process_title()` had been accidentally removed.

Fixes: https://github.com/libuv/libuv/issues/3037
PR-URL: h

linux,macos: fix uv_set_process_title regression

The call to `uv__set_process_title()` had been accidentally removed.

Fixes: https://github.com/libuv/libuv/issues/3037
PR-URL: https://github.com/libuv/libuv/pull/3019
Refs: https://github.com/nodejs/node/issues/35503
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>

show more ...


# 07e4168b 16-May-2020 Ryan Liptak

unix: error when uv_setup_args() is not called

This commit updates uv_{get,set}_process_title() to return an
error when uv_setup_args() is needed, but has not been called.

Per-p

unix: error when uv_setup_args() is not called

This commit updates uv_{get,set}_process_title() to return an
error when uv_setup_args() is needed, but has not been called.

Per-platform behavior after this commit:

- Windows: uv_setup_args() does nothing, get/set process title
works as before.
- Unix: get/set process title will return ENOBUFS if
uv_setup_args() wasn't called, if it failed, or if the process
title memory has been freed by uv__process_title_cleanup()
(via uv_library_shutdown()).
- AIX: set process title returns ENOBUFS if uv_setup_args()
wasn't called, if it failed to allocate memory for the argv
copy, or if the proctitle memory has been freed by
uv__process_title_cleanup() (via uv_library_shutdown).
Getting the process title will do the same except it can
still succeed if uv_setup_args() was called but failed to
allocate memory for the argv copy.
- BSD: uv_setup_args() is only needed for getting the initial
process title; if uv_setup_args() is not called then any
get_process_title calls() before a set_process_title() call
will return an empty string.
- Platforms that use no-proctitle.c: get will return an empty
string, set is a no-op (these are the same as before this commit)

Fixes: https://github.com/libuv/libuv/issues/2845
PR-URL: https://github.com/libuv/libuv/pull/2853
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jameson Nash <vtjnash@gmail.com>

show more ...


# 72fe3543 22-Apr-2020 Ben Noordhuis

unix,win: add uv_library_shutdown()

Make it possible to explicitly tell libuv to release any resources
it's still holding onto (memory, threads, file descriptors, etc.)

Before t

unix,win: add uv_library_shutdown()

Make it possible to explicitly tell libuv to release any resources
it's still holding onto (memory, threads, file descriptors, etc.)

Before this commit, cleanup was performed in various destructors.
This commit centralizes the cleanup logic, enabling the addition of
`uv_library_shutdown()`, but maintains the current observable behavior
of cleaning up when libuv is unloaded by means of `dlclose(3)`.

Fixes: https://github.com/libuv/libuv/issues/2763
PR-URL: https://github.com/libuv/libuv/pull/2764
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...


# 7b28d360 08-Feb-2020 Ben Noordhuis

unix: fix size check in uv_get_process_title()

It was checking that the destination buffer was big enough to hold
the total capacity of the process title (the total storage of argv)

unix: fix size check in uv_get_process_title()

It was checking that the destination buffer was big enough to hold
the total capacity of the process title (the total storage of argv)
when instead it should be checking that it's big enough to hold
the _current_ process title, which is normally much shorter.

Fixes: https://github.com/libuv/libuv/issues/2666
PR-URL: https://github.com/libuv/libuv/pull/2668
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>

show more ...

# ea3a5318 08-Feb-2020 Ben Noordhuis

unix: fix error path in uv_setup_args()

Only update the `process_title` struct on success, otherwise it points
to memory libuv doesn't own. Notably, libuv only owns `argv[0]` _after_

unix: fix error path in uv_setup_args()

Only update the `process_title` struct on success, otherwise it points
to memory libuv doesn't own. Notably, libuv only owns `argv[0]` _after_
copying the argv table.

PR-URL: https://github.com/libuv/libuv/pull/2668
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>

show more ...

Revision tags: v1.34.2, v1.34.1
# 565cdd16 16-Dec-2019 Ben Noordhuis

Revert "darwin: speed up uv_set_process_title()"

This reverts commit 038eacfbf466f0b51e80b6f5fa9026c7ed767dfb.

It was reported that this change causes a regression when trying
t

Revert "darwin: speed up uv_set_process_title()"

This reverts commit 038eacfbf466f0b51e80b6f5fa9026c7ed767dfb.

It was reported that this change causes a regression when trying
to obtain the screen resolution with `CGDisplayPixelsWide()` or
`CGDisplayPixelsHigh()` after changing the process title.

This is the second time this change had to be reverted due to
regressions and, although third time is allegedly the charm,
leaving well enough alone is the proverb I plan to adhere to...

Fixes: https://github.com/libuv/libuv/issues/2566
PR-URL: https://github.com/libuv/libuv/pull/2568
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

Revision tags: v1.34.0, v1.33.1, v1.33.0
# 038eacfb 08-Oct-2019 Ben Noordhuis

darwin: speed up uv_set_process_title()

Libuv loaded and unloaded the Core Services and Application Services for
every call to uv_set_process_title().

Change that to load them o

darwin: speed up uv_set_process_title()

Libuv loaded and unloaded the Core Services and Application Services for
every call to uv_set_process_title().

Change that to load them on the first call to uv_set_process_title() and
delay unloading until libuv is unloaded.

Speeds up process_title_threadsafe by about 10x on my system. It should
fail less often (hopefully not at all) on the CI now.

PR-URL: https://github.com/libuv/libuv/pull/2480
Reviewed-By: Saúl Ibarra Corretgé <s@saghul.net>

show more ...

Revision tags: v1.32.0, v1.31.0
# 97e86dde 03-Aug-2019 Ben Noordhuis

Revert "darwin: speed up uv_set_process_title()"

This reverts commit 00c6b1649d13fdd94bedbfe7ad26c9269c80b32c.

It's been reported (and I can confirm) that this change breaks
`pr

Revert "darwin: speed up uv_set_process_title()"

This reverts commit 00c6b1649d13fdd94bedbfe7ad26c9269c80b32c.

It's been reported (and I can confirm) that this change breaks
`process.title = 'foo'` in Node.js.

Since libuv just calls out to Core Services and Application Services,
and since those frameworks are really just black boxes that you can't
look inside, it's impossible to debug what exactly goes wrong. Revert
it is then.

Fixes: https://github.com/nodejs/node/issues/28945
PR-URL: https://github.com/libuv/libuv/pull/2405
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

Revision tags: v1.30.1, v1.30.0, v1.29.1, v1.29.0, v1.28.0, v1.27.0, v1.26.0, v1.25.0, v1.24.1, v1.24.0
# 00c6b164 02-Nov-2018 Ben Noordhuis

darwin: speed up uv_set_process_title()

Libuv loaded and unloaded the Core Services and Application Services for
every call to uv_set_process_title().

Change that to load them o

darwin: speed up uv_set_process_title()

Libuv loaded and unloaded the Core Services and Application Services for
every call to uv_set_process_title().

Change that to load them on the first call to uv_set_process_title() and
delay unloading until libuv is unloaded.

Speeds up process_title_threadsafe by about 10x on my system.

PR-URL: https://github.com/libuv/libuv/pull/2064
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>

show more ...

Revision tags: v1.23.2, v1.23.1, v1.23.0, v1.22.0, v1.21.0, v1.20.3, v1.20.2, v1.20.1, v1.20.0, v1.19.2, v1.19.1
# 89cbbc89 19-Jan-2018 Mason X

include,src: introduce UV__ERR() macro

Using -errno, -E**, and -pthread_function() can be
error prone, and breaks compatibility with some operating
systems that already negate errno'

include,src: introduce UV__ERR() macro

Using -errno, -E**, and -pthread_function() can be
error prone, and breaks compatibility with some operating
systems that already negate errno's (e.g. Haiku).

This commit adds a UV__ERR() macro that ensures libuv
errors are negative.

Fixes: https://github.com/libuv/help/issues/39
PR-URL: https://github.com/libuv/libuv/pull/1687
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

Revision tags: v1.19.0, v1.18.0, v1.17.0
# 8a6d1b32 15-Nov-2017 Matt Harrison

unix: make get(set)_process_title MT-safe

Used a shared uv_mutex_t in unix implementations of these functions
to prevent simultaneous execution.

Fixes: https://github.com/libuv/

unix: make get(set)_process_title MT-safe

Used a shared uv_mutex_t in unix implementations of these functions
to prevent simultaneous execution.

Fixes: https://github.com/libuv/libuv/issues/271
PR-URL: https://github.com/libuv/libuv/pull/1640
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>

show more ...

Revision tags: v1.16.1, v1.16.0, v1.15.0, v1.14.1
# afc05a3a 17-Aug-2017 Matthew Taylor

unix: modify argv[0] when process title is set

Ensure that argv[0] is changed when uv_set_process_title() is
called. Previously, on some unix systems uv__set_process_title()
was bein

unix: modify argv[0] when process title is set

Ensure that argv[0] is changed when uv_set_process_title() is
called. Previously, on some unix systems uv__set_process_title()
was being called, but argv[0] was not modified.

Partial revert of 78c17238f48d9083359206a2215fc63dd7a0283d.

Refs: https://github.com/libuv/libuv/pull/1396
PR-URL: https://github.com/libuv/libuv/pull/1487
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

show more ...

Revision tags: v1.14.0, v1.13.1, v1.13.0
# 78c17238 01-Jul-2017 Matthew Taylor

unix: always copy process title into local buffer

Ensures that the user's argv is copied into a local buffer when calling
uv_setup_args. Before, the argv was simply being pointed to, whi

unix: always copy process title into local buffer

Ensures that the user's argv is copied into a local buffer when calling
uv_setup_args. Before, the argv was simply being pointed to, which
meant that libuv could end up accessing invalid memory if the user
decided to later edit the memory at that location. It also meant that a
subsequent call to uv_set_process_title would never write more
characters than the length of argv[0].

With the new changes, argv[0] is copied into a temporary buffer and any
subsequent calls to uv_set_process_title will thus be able to copy as
many characters as the call to uv__strdup permits. Note that on *BSD
and AIX this behaviour was already in effect .

Some error checking (specifically checking the result of uv__strdup)
has been added, and calls to uv__free rearranged so that in case of
ENOMEM uv__free can't be called erroneously.

Fixes: https://github.com/libuv/libuv/issues/1395
PR-URL: https://github.com/libuv/libuv/pull/1396
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

show more ...

Revision tags: v1.12.0
# f2756500 25-May-2017 Michele Caini

unix: avoid segfault in uv_get_process_title

Fixes: https://github.com/libuv/libuv/issues/1359
PR-URL: https://github.com/libuv/libuv/pull/1360
Reviewed-By: Ben Noordhuis <info@bnoor

unix: avoid segfault in uv_get_process_title

Fixes: https://github.com/libuv/libuv/issues/1359
PR-URL: https://github.com/libuv/libuv/pull/1360
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

Revision tags: v1.11.0
# f9484cf5 23-Jan-2017 John Barboza

zos: use built-in proctitle implementation

Use built-in proctitle implementation because there is no such thing as
a process title on zOS.

PR-URL: https://github.com/libuv/libuv

zos: use built-in proctitle implementation

Use built-in proctitle implementation because there is no such thing as
a process title on zOS.

PR-URL: https://github.com/libuv/libuv/pull/1208
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

Revision tags: v1.10.2, v1.10.1, v1.10.0
# 840a8c59 27-Jun-2016 cjihrig

unix,win: make uv_get_process_title() stricter

This commit causes uv_get_process_title() to:
- return EINVAL if the buffer is null or size is 0
- return ENOBUFS if the title is too

unix,win: make uv_get_process_title() stricter

This commit causes uv_get_process_title() to:
- return EINVAL if the buffer is null or size is 0
- return ENOBUFS if the title is too big for the buffer
- null terminate the buffer on success

Fixes: https://github.com/libuv/libuv/issues/315
PR-URL: https://github.com/libuv/libuv/pull/928
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

Revision tags: v0.10.37, v1.9.1, v1.9.0, v1.8.0, v1.7.5, v1.7.4, v1.7.3, v1.7.2, v1.7.1, v1.7.0, v1.6.1, v1.6.0
# bddd6a84 26-May-2015 Saúl Ibarra Corretgé

core: add ability to customize memory allocator

This patch is composed by the work done in
https://github.com/libuv/libuv/pull/231 and
https://github.com/libuv/libuv/pull/287 plus so

core: add ability to customize memory allocator

This patch is composed by the work done in
https://github.com/libuv/libuv/pull/231 and
https://github.com/libuv/libuv/pull/287 plus some changes by yours
truly.

Thanks @beevik and @mattsta for their work on this!

PR-URL: https://github.com/libuv/libuv/pull/368
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>

show more ...

Revision tags: v1.5.0
# 1f711e4d 29-Apr-2015 Saúl Ibarra Corretgé

Revert "memory: add uv_replace_allocator"

This reverts commit c272f1f1bc0bda625e6441d798c110b4064a6ce2.

The concept will come back to libuv, but it needs some more work.

# c272f1f1 26-Feb-2015 Brett Vickers

memory: add uv_replace_allocator

With uv_replace_allocator, it's possible to override the default
memory allocator's malloc and free calls with functions of the user's
choosing. This

memory: add uv_replace_allocator

With uv_replace_allocator, it's possible to override the default
memory allocator's malloc and free calls with functions of the user's
choosing. This allows libuv to interoperate with projects requiring a
custom memory allocator.

Internally, all calls to malloc and free have been replaced with
uv__malloc and uv__free, respectively. The uv__malloc and uv__free
functions call malloc and free unless they have been overridden by a
previous call to uv_replace_allocator.

As part of this change, the special aligned memory allocations
performed in src/win/fs-event.c have been replaced with standard
allocations. The 4-byte alignment being requested in this file was
unnecessary, since standard allocators already guarantee at least an
8-byte alignment.

PR-URL: https://github.com/libuv/libuv/pull/231
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

Revision tags: v0.10.36, v1.4.2, v0.10.35, v1.4.1, v0.10.34, v1.4.0, v1.3.0, v0.10.33, v1.2.1, v1.2.0, v0.10.32, v1.1.0, v0.10.31, v1.0.2, v0.10.30, v1.0.1, v1.0.0, v0.10.29, v1.0.0-rc2, v1.0.0-rc1, v0.11.29, v0.11.28, v0.11.27, v0.10.28, v0.11.26, v0.10.27, v0.11.25, v0.11.24, v0.11.23, v0.10.26, v0.11.22, v0.11.21, v0.11.20, v0.10.25, v0.11.19, v0.10.24, v0.11.18, v0.10.23, v0.10.22, v0.11.17, v0.10.21, v0.11.16, v0.10.20, v0.11.15, v0.10.19, v0.11.14, v0.10.18, v0.10.17, v0.10.16, v0.11.13, v0.11.12, v0.11.11, v0.11.10, v0.10.15, v0.11.9, v0.10.14, v0.11.8
# fd23dbf5 12-Aug-2013 Ben Noordhuis

unix: clean up __attribute__((quux)) usage

Macro-ify __attribute__((destructor)) and __attribute__((unused)).

The macros are no-ops when the compiler does not support function
a

unix: clean up __attribute__((quux)) usage

Macro-ify __attribute__((destructor)) and __attribute__((unused)).

The macros are no-ops when the compiler does not support function
attributes.

show more ...

Revision tags: v0.11.7, v0.10.13, v0.11.6, v0.10.12, v0.11.5, v0.10.11
# 3ee4d3f1 06-Jun-2013 Ben Noordhuis

unix, windows: return error codes directly

This commit changes the libuv API to return error codes directly rather
than storing them in a loop-global field.

A code snippet like

unix, windows: return error codes directly

This commit changes the libuv API to return error codes directly rather
than storing them in a loop-global field.

A code snippet like this one:

if (uv_foo(loop) < 0) {
uv_err_t err = uv_last_error(loop);
fprintf(stderr, "%s\n", uv_strerror(err));
}

Should be rewritten like this:

int err = uv_foo(loop);
if (err < 0)
fprintf(stderr, "%s\n", uv_strerror(err));

The rationale for this change is that it should make creating bindings
for other languages a lot easier: dealing with struct return values is
painful with most FFIs and often downright buggy.

show more ...

Revision tags: v0.10.10, v0.11.4, v0.10.9, v0.10.8, v0.11.3, v0.10.7, v0.10.6, v0.11.2, v0.10.5, v0.10.4, v0.11.1, node-v0.11.0, v0.10.2, node-v0.7.3, node-v0.7.7, node-v0.7.5, node-v0.5.3, node-v0.10.1, node-v0.10.0, node-v0.9.12, node-v0.9.11
# a0c1d84c 26-Feb-2013 Ben Noordhuis

linux, darwin: don't touch environ in uv_setup_args

Don't overwrite the environment. On OS X, the entries in the environ
table are not necessarily adjacent. It's arguably also safer for

linux, darwin: don't touch environ in uv_setup_args

Don't overwrite the environment. On OS X, the entries in the environ
table are not necessarily adjacent. It's arguably also safer for setuid
binaries.

Fixes joyent/node#4847.

show more ...

# e89aced8 24-Feb-2013 Ben Noordhuis

darwin: implement uv_set_process_title, part 2

Make changes to the process title visible to tools like `ps`.

The argv clobber technique is reasonably portable across Unices;
the

darwin: implement uv_set_process_title, part 2

Make changes to the process title visible to tools like `ps`.

The argv clobber technique is reasonably portable across Unices;
the common code has been moved into src/unix/proctitle.c and is used
on Linux and OS X. Other platforms will probably follow in the future.

show more ...