Home GnuPG

spawn: Avoid bumping the error counter.

Description

spawn: Avoid bumping the error counter.

* src/spawn-posix.c: Use log_info instead of log_error.
* src/spawn-w32.c: Ditto.
(spawn_detached): Fix copying of hd[2]
(_gpgrt_process_spawn): Ditto.

The spawn function might be used to run helper processes which are
non-critical for the operation of the program. For example to display
help. Bumping the error counter via gpgrt_log_error would then let
the entire program fail which might be surprising. It is better to
just print an informational message and let the caller decide what to
do with the returned error code.

Details

Provenance
wernerAuthored on Jun 5 2024, 10:31 AM
Parents
rE2caaef8f6b89: spawn: Expose spawn functions API.
Branches
Unknown
Tags
Unknown