bug-gnulib
[Top][All Lists]
Advanced

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

execute, spawn-pipe: Use posix_spawn by default on native Windows


From: Bruno Haible
Subject: execute, spawn-pipe: Use posix_spawn by default on native Windows
Date: Fri, 25 Dec 2020 02:31:49 +0100
User-agent: KMail/5.1.3 (Linux/4.4.0-197-generic; KDE/5.18.0; x86_64; ; )

Now that posix_spawn works on native Windows, the modules 'execute'
and 'spawn-pipe' can be changed to use this as the new implementation
(instead of 'spawnvech', which implements only a special case).

This new implementation surely allocates more temporary memory, and
also calls DuplicateHandle more often than the previous implementation.
But it is more open to customizations (e.g. call setpgrp or setsid
in the future).


2020-12-24  Bruno Haible  <bruno@clisp.org>

        spawn-pipe: Use posix_spawn by default on native Windows.
        * lib/spawn-pipe.c (SPAWN_PIPE_IMPL_AVOID_POSIX_SPAWN): New macro.
        (create_pipe): Use it to decide among the two possible implementations.
        * modules/spawn-pipe (Depends-on): Add posix_spawnattr_setpgroup.

2020-12-24  Bruno Haible  <bruno@clisp.org>

        unistd-safer: Implement pipe_safer on native Windows.
        * lib/pipe-safer.c (pipe_safer): Don't test HAVE_PIPE.
        * modules/unistd-safer (Depends-on): Add pipe-posix.

2020-12-24  Bruno Haible  <bruno@clisp.org>

        execute: Use posix_spawn by default on native Windows.
        * lib/execute.c (EXECUTE_IMPL_AVOID_POSIX_SPAWN): New macro.
        (execute): Use it to decide among the two possible implementations.

Attachment: 0001-execute-Use-posix_spawn-by-default-on-native-Windows.patch
Description: Text Data

Attachment: 0002-unistd-safer-Implement-pipe_safer-on-native-Windows.patch
Description: Text Data

Attachment: 0003-spawn-pipe-Use-posix_spawn-by-default-on-native-Wind.patch
Description: Text Data


reply via email to

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