mirror of
https://github.com/boostorg/process.git
synced 2026-01-20 04:42:24 +00:00
Compare commits
3 Commits
issue/285b
...
boost-1.84
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1873f34435 | ||
|
|
5f795d9e62 | ||
|
|
f17be678f2 |
@@ -33,7 +33,7 @@ inline std::vector<native_handle_type> get_handles(std::error_code & ec)
|
||||
else
|
||||
ec.clear();
|
||||
|
||||
auto my_fd = ::dirfd(dir.get());
|
||||
auto my_fd = dirfd(dir.get());
|
||||
|
||||
struct ::dirent * ent_p;
|
||||
|
||||
@@ -117,7 +117,7 @@ struct limit_handles_ : handler_base_ext
|
||||
return;
|
||||
}
|
||||
|
||||
auto my_fd = ::dirfd(dir);
|
||||
auto my_fd = dirfd(dir);
|
||||
struct ::dirent * ent_p;
|
||||
|
||||
while ((ent_p = readdir(dir)) != nullptr)
|
||||
|
||||
@@ -112,8 +112,15 @@ filesystem::path cwd(boost::process::v2::pid_type pid, boost::system::error_code
|
||||
|
||||
filesystem::path cwd(boost::process::v2::pid_type pid, boost::system::error_code & ec)
|
||||
{
|
||||
#if (defined(__linux__) || defined(__ANDROID__))
|
||||
return filesystem::canonical(
|
||||
filesystem::path("/proc") / std::to_string(pid) / "cwd", ec);
|
||||
filesystem::path("/proc") / std::to_string(pid) / "cwd", ec
|
||||
);
|
||||
#elif defined(__sun)
|
||||
return fileystem::canonical(
|
||||
filesystem::path("/proc") / std::to_string(pid) / "path/cwd", ec
|
||||
);
|
||||
#endif
|
||||
}
|
||||
|
||||
#elif defined(__FreeBSD__)
|
||||
|
||||
@@ -133,7 +133,7 @@ filesystem::path exe(boost::process::v2::pid_type pid, boost::system::error_code
|
||||
);
|
||||
#elif defined(__sun)
|
||||
return fileystem::canonical(
|
||||
filesystem::path("/proc") / std::to_string(pid) / "path/a.out"
|
||||
filesystem::path("/proc") / std::to_string(pid) / "path/a.out", ec
|
||||
);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ process_standalone_test(pipe)
|
||||
|
||||
function(process_sub_launch_test name )
|
||||
add_executable(boost_process_${name} ${name}.cpp)
|
||||
target_link_libraries(boost_process_${name} Boost::process Boost::system Boost::filesystem Boost::thread Boost::unit_test_framework)
|
||||
target_link_libraries(boost_process_${name} Boost::process Boost::system Boost::filesystem Boost::scope_exit Boost::thread Boost::unit_test_framework)
|
||||
add_test(NAME boost_process_${name} COMMAND $<TARGET_FILE:boost_process_${name}> $<TARGET_FILE:boost_process_sub_launch> )
|
||||
endfunction()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user