coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: split: prefer posix_spawn to fork and execl


From: Collin Funk
Subject: Re: split: prefer posix_spawn to fork and execl
Date: Thu, 23 Oct 2025 14:51:46 -0700
User-agent: Gnus/5.13 (Gnus v5.13)

PƔdraig Brady <P@draigBrady.com> writes:

> On 23/10/2025 20:44, Collin Funk wrote:
>> Collin Funk <collin.funk1@gmail.com> writes:
>> 
>>> Thanks, I pushed it with those changes [1].
>> Oops, tiny oversight. Forgot to call posix_spawnattr_destroy and
>> posix_spawn_file_actions_destroy when we successfully call posix_spawn.
>> I pushed the attached patch to fix that.
>
> Does that mean we don't need the ignore_value() wrapping in install.c?

Yep, I am not really sure why I used it since glibc doesn't give it the
warn_unused_result attribute.

Pushed the attached patch to remove that. Also regarding these lines:

       if (attrp)
    -    ignore_value (posix_spawnattr_destroy (&attr));
    +    posix_spawnattr_destroy (attrp);

It felt a bit awkward to check the pointer and then not use it as the
argument. No functional change, but makes things easier to read IMO.

Collin

Attachment: 0001-maint-remove-unnecessary-ignore_value-usage.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]