Skip to content

Commit

Permalink
Merge remote-tracking branch 'parent/next'
Browse files Browse the repository at this point in the history
  • Loading branch information
trcrsired committed Jan 17, 2025
2 parents e6daac7 + d6635d6 commit 34f1bb0
Show file tree
Hide file tree
Showing 8 changed files with 437 additions and 83 deletions.
2 changes: 1 addition & 1 deletion include/fast_io_core_impl/mode.h
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ enum class open_mode : ::std::uint_least64_t
tty_init = static_cast<::std::uint_least64_t>(1) << 32,
// POSIX O_TTY_INIT
nt_path = static_cast<::std::uint_least64_t>(1) << 33,
// [Windows NT] use nt path on nt file
// [Windows NT]Open the file using nt path
};

inline constexpr open_mode operator&(open_mode x, open_mode y) noexcept
Expand Down
8 changes: 4 additions & 4 deletions include/fast_io_hosted/platforms/win32.h
Original file line number Diff line number Diff line change
Expand Up @@ -1081,8 +1081,8 @@ inline win32_9xa_dir_handle basic_win32_9xa_create_dir_file_at_fs_dirent_impl(wi
}
}

win32_9xa_dir_handle ret{concat_win32_9xa_dir_handle_path_str(::fast_io::mnp::code_cvt(directory_handle->path), u8"\\", ::fast_io::mnp::os_c_str_with_known_size(beg, filename_c_str_len))};

check_win32_9xa_dir_is_valid(*directory_handle);
win32_9xa_dir_handle ret{concat_win32_9xa_dir_handle_path_str(directory_handle->path, u8"\\", ::fast_io::mnp::os_c_str_with_known_size(beg, filename_c_str_len))};
check_win32_9xa_dir_is_valid(ret);

return ret;
Expand Down Expand Up @@ -1130,8 +1130,8 @@ inline void *basic_win32_9xa_create_file_at_fs_dirent_impl(win32_9xa_dir_handle
throw_win32_error(3221225530);
}
}

win32_9xa_dir_handle_path_str str{concat_win32_9xa_dir_handle_path_str(::fast_io::mnp::code_cvt(directory_handle->path), u8"\\", ::fast_io::mnp::os_c_str_with_known_size(beg, filename_c_str_len))};
check_win32_9xa_dir_is_valid(*directory_handle);
win32_9xa_dir_handle_path_str str{concat_win32_9xa_dir_handle_path_str(directory_handle->path, u8"\\", ::fast_io::mnp::os_c_str_with_known_size(beg, filename_c_str_len))};
auto handle{::fast_io::details::win32_create_file_impl<win32_family::ansi_9x>(str, ompm)};
return handle;
}
Expand Down
2 changes: 1 addition & 1 deletion include/fast_io_hosted/process/process/native.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#if !defined(__MSDOS__) && !defined(__NEWLIB__) && !defined(__wasi__) && !defined(_PICOLIBC__)
// #include "base.h"
#include "option.h"
#include "arg_env.h"
#if (defined(_WIN32) && !defined(__WINE__)) || defined(__CYGWIN__)
#include "win32.h"
Expand Down
2 changes: 1 addition & 1 deletion include/fast_io_hosted/process/process/nt.h
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ inline nt_user_process_information nt_create_process_overloads(path_type const &
return nt_process_create_impl<family>(nf.handle, args.get(), envs.get(), processio);
}

template <nt_family family, typename path_type>
template <nt_family family>
inline nt_user_process_information nt_create_process_overloads(::fast_io::nt_fs_dirent ent, nt_process_args const &args,
nt_process_envs const &envs,
win32_process_io const &processio)
Expand Down
14 changes: 14 additions & 0 deletions include/fast_io_hosted/process/process/option.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#pragma once

namespace fast_io
{
enum process_mode : ::std::uint_least64_t
{
none = 0,
// *indicates that the process mode has not been evaluated yet
new_session = static_cast<::std::uint_least64_t>(1) << 0,
// [POSIX] setsid(), [WINDOWS, WINNT] CREATE_NEW_PROCESS_GROUP | DETACHED_PROCESS
nt_path = static_cast<::std::uint_least64_t>(1) << 1
// [WINNT] Set the process path in the PEB to nt path
};
}
Loading

0 comments on commit 34f1bb0

Please sign in to comment.