2
0
mirror of https://github.com/boostorg/process.git synced 2026-01-19 04:22:15 +00:00
Commit Graph

1299 Commits

Author SHA1 Message Date
Jackarain
9561ebad1c Fix mingw cross-compile boost-1.86.0 2024-07-31 08:19:56 +08:00
Klemens Morgenstern
755a3ec78d fixed dll symbokl export on windows & clean up jamfile. boost-1.86.0.beta1 2024-07-24 10:12:10 +08:00
Klemens Morgenstern
5f80218655 added CLOSE_RANGE_UNSHARE defined for syscall of close_range. 2024-07-20 08:25:10 +08:00
Ruben Perez
3719df39cd Alpine-Linux CI 2024-07-20 08:25:10 +08:00
Klemens Morgenstern
67a2f97633 fixes include of gnu/libc-version.h
closes #386
2024-07-19 09:17:06 +08:00
Klemens Morgenstern
8b3e90234b b2 link fixes. 2024-07-12 09:03:08 +08:00
Klemens Morgenstern
8044857bb9 c++14 constexpr fixes for environment_win. 2024-07-12 09:03:08 +08:00
zhixingchen
414d0d6b84 FIX: fix the function call with error code 2024-07-04 19:17:17 +08:00
Klemens Morgenstern
2c372461e8 added link to ntdll. 2024-07-03 18:18:02 +08:00
Klemens Morgenstern
2b436127ee added WinSock.h include workarounds. 2024-07-03 16:36:31 +08:00
Klemens Morgenstern
c342762484 added Boost::filesystem dependency to build scripts. 2024-07-03 10:32:49 +08:00
Klemens Morgenstern
c2da58e548 added exit_code timeout. 2024-07-02 21:06:23 +08:00
Klemens Morgenstern
aea22dbf6b added musl workaround. 2024-07-02 21:06:23 +08:00
Klemens Morgenstern
084a85fc6e switched to run_for in exit_code.cpp. 2024-07-02 21:06:23 +08:00
Klemens Morgenstern
2171367d97 added completion to spawn in tests. 2024-07-02 21:06:23 +08:00
Klemens Morgenstern
67a92df441 fixed missing return. 2024-07-02 21:06:23 +08:00
Klemens Morgenstern
c773ee16cf replaced v2 .ipp with lib. 2024-07-02 21:06:23 +08:00
Klemens Morgenstern
274fc3163a minor process_handle_fd.hpp fix. 2024-07-02 21:06:23 +08:00
Klemens Morgenstern
44cae64d49 minor fixes. 2024-07-02 21:06:23 +08:00
Klemens Morgenstern
55e2460967 moved v1 to v1 inline namespace. 2024-07-02 21:06:23 +08:00
Klemens Morgenstern
bcdd91188c move everything v1 to v1 folders 2024-07-02 21:06:23 +08:00
Daniel Klauer
e455a12e2c posix: Add test for pipe fd leak if redirecting both stdout and stderr
Signed-off-by: Daniel Klauer <daniel.klauer@gin.de>
2024-06-04 08:54:21 +08:00
Daniel Klauer
e8b5bf17f0 posix: Fix pipe fd leak if redirecting both stdout and stderr
This re-adds the close(source) call which already existed here before
commit caa7b2fcc8. pipe_out already closes the source fd when redirecting
stdout or stderr, it was just missing when redirecting both at once.

The pipe fds must be closed after redirecting to avoid keeping the pipe
open unnecessarily, for example the parent may want to close their end of
the pipe.

Closes: https://github.com/boostorg/process/issues/353
Signed-off-by: Daniel Klauer <daniel.klauer@gin.de>
2024-06-04 08:54:21 +08:00
Orgad Shaneh
20510abc65 Doc: Add missing ctor param in example 2024-06-04 08:20:11 +08:00
Daniel Klauer
0058a9c69f posix: Fix exec error reporting with limit_handles
_pipe_sink was assigned after call_on_setup(), after limit_fd_::on_setup(),
but this was too late. It must be assigned earlier so that
executor::get_used_handles() can see it and prevent limit_handles from
closing the internal pipe for passing exec() errors from child to parent.

Fixes: 1a1d677d
Closes: https://github.com/boostorg/process/issues/202
Signed-off-by: Daniel Klauer <daniel.klauer@gin.de>
2024-06-04 08:19:54 +08:00
zhixingchen
a26f4fe3c5 FIX: fix the posix terminate function implement. 2024-06-04 08:07:54 +08:00
zhixingchen
ff5b383833 FIX: fix the problem of sending the wrong signal. 2024-06-04 08:07:54 +08:00
Samuel Venable
0379ee6668 Less dependency on libprocstat and various corrections.
On FreeBSD I would like to remove dependency on libprocstat completely, and replace it with libkvm to be more like the other *BSD platforms in terms of linker dependencies. This pull request is our first move in that direction.

Replace libprocstat with libkvm in cmd
2024-06-04 08:04:03 +08:00
zhixingchen
193384a450 FIX(process): modify the internal logic call of resume without error code version. 2024-05-11 11:26:48 +08:00
Christian Eggers
406cd3ecf3 v2: sync initial value for exit code with v1
The initial value for the exit_code (0x7f) in v2 doesn't work with musl libc.
Here WIFSIGNALED(0x7f) expands to a non-zero value:

http://git.musl-libc.org/cgit/musl/tree/include/sys/wait.h#n54
boost-1.85.0
2024-04-01 06:40:48 +08:00
Devon Morris
c6951ff773 fix call on moved variable in execute 2024-04-01 06:38:00 +08:00
mknaleczb
f2330c195a Changed return value from "" to string_type() 2024-04-01 06:36:48 +08:00
Samuel Venable
2ae279bd15 Add more error handling to bp2::ext cwd.ipp. (#354)
* Add more error handling to bp2::ext cwd.ipp.

* Remove redundant errno checks

these functions don't fail...
2024-04-01 06:35:17 +08:00
Christian Eggers
7a17af0f5c v2: fix closing of file descriptors
Fix off-by-one error. Currently, no handles are actually closed.
2024-03-28 21:57:13 +08:00
Christian Eggers
768944672f posix: pipe_out: fix merge conflict
In commit cbaa913e3d ("Merge branch 'develop' into limit_fd"), there
have been merge conflicts in two files. In pipe_out.hpp, a previous
commit from the "limit_fd" branch f8c0dd4da5 ("prototype for
limit_fd") had been eliminated during wrong conflict resolution.

The final result was, that file descriptors for stdout pipes were not
preserved when using limit_handles.

Example:

boost::asio::io_context io_context;
bp::async_pipe my_stdin(io_context);
bp::async_pipe my_stdout(io_context);
bp::child my_child("/usr/bin/echo", "Hello world",
    bp::std_in  < my_stdin,  // preserved by limit_handles
    bp::std_out > my_stdout, // closed by limit_handles
    bp::std_err > stderr,    // preserved by limit_handles
    bp::limit_handles)

Fixes: cbaa913e3d ("Merge branch 'develop' into limit_fd")
2024-03-28 21:56:58 +08:00
Klemens Morgenstern
46acb247f5 test include fix. 2024-03-28 11:05:33 +08:00
Klemens Morgenstern
08e3549713 #include vector fixes. 2024-03-28 08:30:08 +08:00
Klemens Morgenstern
029ad735fe added missing rename of variable. 2023-10-25 19:29:41 +08:00
Klemens Morgenstern
03a348ebdd Merge branch 'develop' of https://github.com/boostorg/process into develop 2023-10-25 19:06:26 +08:00
Klemens Morgenstern
f289f26c87 minor windows cleanup 2023-10-25 15:38:49 +08:00
Klemens Morgenstern
8d9aa1e31d incresed request_exit delay in windows process test. 2023-10-13 14:25:04 +08:00
Samuel Venable
1873f34435 Fix V2::EXT::CWD [SunOS] (#310)
* Fix V2::EXT::CWD [SunOS]

filesystem::canonical is basically the same thing as realpath on Unix-likes, which only resolves one symbolic link. If one symbolic link points to yet another symbolic link and so on and so forth, it will not resolve all symbolic links. It will only do one link for each call to canonical. On SunOS, unlike Linux, /proc/${pid}/cwd does not directly point to the literal current working directory of the given ${pid}. Instead, it will point to yet another symlink - /proc/${pid}/path/cwd which once you have followed that second link only then will you have the literal cwd path for the process id.
boost-1.84.0.beta1 boost-1.85.0.beta1 boost-1.84.0
2023-10-12 21:43:59 +08:00
Ilia
5f795d9e62 Fix compilation for macOS 14 SDK
Fixes #342
2023-10-09 10:46:25 +08:00
Daniel Richard G
f17be678f2 fix group_wait test in cmake build. 2023-10-09 10:46:03 +08:00
AJIOB
b9fc531507 Code typos fix 2023-10-05 09:36:50 +08:00
Klemens Morgenstern
69c2c25729 added SIGTERM bit mask for freeBSD. 2023-10-05 06:52:20 +08:00
Klemens Morgenstern
8ab2332327 v2/env win test fix. 2023-10-05 06:52:20 +08:00
Klemens Morgenstern
ea69cda6d8 added can_interrupt check on windows to win tests. 2023-10-05 06:52:20 +08:00
Klemens Morgenstern
6b75b4039f increased timeout & added diagnostics. 2023-10-05 06:52:20 +08:00
Klemens Morgenstern
3c1beb40f6 windows move handle fix. 2023-10-05 06:52:20 +08:00