Skip to content

Conversation

@MacroModel
Copy link
Collaborator

No description provided.

- Updated `get` function signatures in `tuple.h` to return `decltype(auto)` for improved type deduction.
- Enhanced consistency by ensuring `[[nodiscard]]` attribute is applied uniformly across all overloads of `get`.
- Added new overloads for `get` to support retrieval by type, improving usability and flexibility.
- Minor formatting adjustments for better readability in the `forward_as_tuple` function.
- Introduced `apply` function to facilitate the application of a callable to elements of a tuple.
- Added `tuple_size` function to retrieve the size of a `fast_io::containers::tuple`.
- Implemented helper functions in the `details` namespace for improved code organization and clarity.
…rm headers

- Updated error handling in various platform headers to consistently use `throw_posix_error()` with appropriate error codes.
- Enhanced function signatures in POSIX and platform-specific implementations for clarity and consistency.
- Replaced direct calls to system functions with `noexcept_call` for safer error management.
- Improved readability and maintainability of the code by standardizing error checks and function calls.
…in POSIX headers

- Updated `thread_start_routine` in both NT and Win32 headers to include `FAST_IO_WINSTDCALL` for better calling convention compatibility.
- Enhanced error handling in `get_module_install_path_from_argv0` by checking for a null environment path and throwing an appropriate error.
- Improved readability by initializing pointers to empty and using consistent formatting in the `argv0.h` file.
- Adjusted conditional compilation checks in `posix.h` for clearer handling of open mode flags.
…tion

- Updated `get` function signatures to return `auto&&` instead of `decltype(auto)` for better type handling.
- Enhanced consistency across all overloads of `get` by applying uniform return types.
- Minor adjustments made to improve readability and maintainability of the code.
…tion functions

- Added error checks for null pointers and buffer overflows in `get_module_install_path_from_argv0` to ensure robust path resolution.
- Updated `get_module_install_path` to handle `sysctl` errors more accurately.
- Replaced direct system calls with `noexcept_call` for safer error management across various platform headers.
- Improved readability and maintainability by standardizing error handling and function calls.
- Updated function signatures in `android.h` to include `noexcept` for improved safety and performance.
- Refactored operator overloads and logging implementations to ensure exception safety during logging operations.
- Improved code clarity and maintainability by standardizing function signatures across the Android logging interface.
…m headers

- Added null pointer check in `is_invalid_dos_filename_with_size` to prevent crashes.
- Refactored `zero_copy_transmit64_define` to streamline character transmission logic and improve performance.
- Updated `try_lock` method in `posix_file_lock` to return a boolean indicating lock success.
- Adjusted function signatures in various headers for consistency and clarity, including changes to `NtSetSystemTime` and `RtlAcquirePebLock`.
- Improved error handling in `posix_seek_impl` to throw appropriate errors for overflow conditions.
… and function signatures

- Updated `sys_mmap` to use `long` for return type and improved error handling for memory mapping.
- Refactored `open_socket_impl` to include checks for socket open modes and set appropriate flags for non-blocking and close-on-exec behavior.
- Introduced `to_win32_page_protect` function for better handling of file map attributes in Win32.
- Enhanced error handling in `create_file_mapping_impl` and random number generation functions to account for API behavior as per MSDN documentation.
…ype safety

- Changed the type of `tms` from `uint_least64_t` to `int_least64_t` to ensure proper handling of negative values.
- Updated calculations for `tms` to maintain consistency and prevent potential overflow issues.
…e consistency

- Adjusted function signatures in `msvc_linker_32_i686.h`, `msvc_linker_32.h`, `msvc_linker_64.h`, and `msvc_linker_arm64ec.h` to ensure proper handling of parameters and return types.
- Enhanced consistency across linker headers by standardizing the naming conventions for function aliases.
- Improved clarity and maintainability of the code by ensuring uniformity in the handling of alternate names for Windows API functions.
…s to return references

- Updated `append` methods in `basic_win32_process_args`, `basic_win32_process_envs`, and `posix_process_args` to return a reference to the current object, enhancing method chaining capabilities.
- Improved code clarity and consistency across process argument and environment handling.
…ength calculation

- Updated the resizing logic in `posix.h` to correctly account for the null terminator when determining the length of the string.
- Added a trailing slash to the returned path string to ensure proper formatting when appending filenames.
- Introduced a new `posix_vfork` option in `option.h` to support process creation using vfork, which has specific limitations on parameter modifications.
- Refactored process execution methods in `posix.h` to utilize a common `fork_execveat_impl` function, streamlining the handling of process creation based on the selected mode.
- Enhanced clarity and maintainability of the code by consolidating vfork and pipefork logic into unified implementations.
…intainability

- Added conditional compilation for session management in the vfork_and_execveat function, enhancing the handling of process creation modes.
- Improved code organization by encapsulating session management logic within preprocessor directives, allowing for easier modifications in the future.
…ocess mode

- Modified the vfork_and_execveat function signature to add [[maybe_unused]] for the process_mode parameter, improving code clarity and indicating that the parameter may not be utilized in all contexts.
- Changed the process_mode enumeration to a scoped enum class for better type safety and clarity.
- Added a new 'follow' option to the process_mode enum to allow symbolic links to be followed during process execution.
- Updated the posix_execveat function to accept the process_mode parameter, modifying behavior based on the follow option.
- Refactored flags handling in posix_execveat and vfork_and_execveat functions to improve clarity and maintainability.
- Introduced a new flag in process_mode to control the appending of paths to argv0, enhancing process creation flexibility.
- Updated the nt_6x_process_create_impl and nt_create_process_overloads functions to utilize the new argv0_no_path_append flag for improved argument handling.
- Refactored open_mode handling in process creation functions to accommodate the follow option, ensuring consistent behavior across different modes.
- Enhanced clarity and maintainability of the code by organizing process parameter initialization and handling logic.
…ation marks around paths

- Updated the process creation logic to include double quotation marks around the image path and process parameters when appending to argv0.
- Improved clarity in the handling of DOS and NT paths by ensuring proper formatting during argument construction.
- Updated the `cstr_guard` return logic to enhance readability by removing unnecessary return statements.
- Introduced a new namespace `posix` to encapsulate platform-specific environment variable handling, including `_NSGetEnviron` for Darwin and `environ` for other platforms.
- Streamlined the `get_envs` function to utilize the new `posix` namespace, improving code organization and maintainability.
…ent structure

- Changed the initialization of process arguments from a string to a native__process_args structure for improved clarity and consistency in argument handling.
- This update enhances the readability of the code and aligns with recent refactoring efforts in process management.
… handling

- Moved platform-specific environment variable declarations into the posix namespace for better organization and clarity.
- Updated references in the get_envs function to utilize the new namespace, enhancing code maintainability and readability.
- Removed redundant declarations to streamline the code structure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant