aitjcize / cppman

C++ 98/11/14 manual pages for Linux/MacOS
GNU General Public License v3.0
1.31k stars 80 forks source link

[Feature Request] Avoid `os.fork()` #176

Closed KSR-Yasuda closed 3 months ago

KSR-Yasuda commented 3 months ago

Could you avoid os.fork()?

On Windows env, cppman fails on os.fork(), since python is not supporting process fork.

How to Repro

% /mingw64/bin/python --version
Python 3.11.9

% pacman -F /mingw64/bin/python.exe
mingw64/bin/python.exe is owned by mingw64/mingw-w64-x86_64-python 3.11.9-1

% pacman -Q msys2-runtime
msys2-runtime 3.5.3-5

# Create virtual env to install `cppman` globally.
# It creates MinGW64 python virtual env.
% cd some/venv/path
% /mingw64/bin/python -m venv .

# Install `cppman` into the virtual env.
# Installed `cppman` runs on the python in the virtual env,
# that is a copy of MinGW64 python which has created the virtual env.
% ./bin/pip install cppman
% ./bin/cppman --version
some/venv/path/bin/cppman Ver 0.5.7
Copyright (C) 2010 Wei-Ning Huang
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Wei-Ning Huang (AZ) <aitjcize@gmail.com>.

# It fails due to `os.fork()` missing of MinGW64 python.
% ./bin/cppman static_assert
error: module 'os' has no attribute 'fork'
KSR-Yasuda commented 3 months ago

Even if os.fork() issue is cleared, it may be still hard to run on MinGW python due to file path problem: it manages file path in Windows style (e.g. C:\\dir\\path\\name).

I'd rather give up MinGW python and use MSYS2 ver.

I'll close the issue for now.