Skip to content

fixup/experiment: replace std::system by boost.process to launch processes in a cross-platform way#685

Closed
Klaim wants to merge 4 commits intojupyter-xeus:mainfrom
Klaim:fixup-tests-xpython-process
Closed

fixup/experiment: replace std::system by boost.process to launch processes in a cross-platform way#685
Klaim wants to merge 4 commits intojupyter-xeus:mainfrom
Klaim:fixup-tests-xpython-process

Conversation

@Klaim
Copy link
Copy Markdown
Contributor

@Klaim Klaim commented Jan 21, 2026

Theory this attempts to confirm: std::system takes a command sent to whatever terminal system is running for that system, which on Windows might depend (cmd, powershell, git-bash etc.) and & to launch a process without waiting for it doesnt work on Windows, making the tests hang waiting for the end of the xpython process.
Instead, launch that process using a cross-platform process library (here I used boost.python because I'm familiair with it's V1 api, using V2's api for now) so that the process launch is independant from the platform or terminal system. Also set it up so that the process lifetime is scoped , but without waiting for it to continue working the tests.

Boost.process could be replaced by another library, the core idea here is just to not use std::system.

On my local windows:

  • with main the c++ tests hang , waiting at the std::system call , waiting for the xpython process to end, even after 8 minutes;
  • with this change: all tests pass in 1 minutes.

Klaim added a commit to Klaim/xeus-python that referenced this pull request Jan 22, 2026
@Klaim Klaim changed the title fixup/test : replace std::system by boost.process to launch processes in a cross-platform way fixup/experiment: replace std::system by boost.process to launch processes in a cross-platform way Jan 22, 2026
Klaim added a commit to Klaim/xeus-python that referenced this pull request Mar 26, 2026
@Klaim
Copy link
Copy Markdown
Contributor Author

Klaim commented Mar 26, 2026

proper fix moved in #702

@Klaim Klaim closed this Mar 26, 2026
SylvainCorlay pushed a commit that referenced this pull request Mar 27, 2026
* applied #685 to async pr

* added missing boost dependency

* ignore root build dirs

* added missing boost packages dependencies

* debug duct tape and more info

* removed msvc-specific instruction

* tests wait for xpython's ready message instead of sleep

* debug duct tape and more info

* fi

* fix

* x6

* one minute

* cleaner fix: lock python's GIL when destroying the debugger

* cleanup python path deduction unicode-friendly (on windows) and absolute paths

* removed debugging logs & cleaned error logs

* imrpoved sub-process tracking output in tests

* removed commented code

* run 20 times on windows

* run tests 20 times on unix

* show test run number in CI logs

* removed changes to python path deduction, improved wrong path detection and report instead

* debugger reference decreased instead of object destroyed

* removed some logs

---------

Co-authored-by: DerThorsten <derthorstenbeier@gmail.com>
JohanMabille pushed a commit that referenced this pull request Apr 14, 2026
* Fix context errors

* Working build

* Working without debugger

The debugger causes zmq errors somewhere

* Not working

* Partially working

* Working

* Rename xhook

* Move hook

* Add uvw dependency

* Ignore pybind11 visibility warning

* Clean hook

* Clean main

* Fix hook implementaion

* updates

* remove mac-13

* movin find uv related code to non-emscripten branch

* working

* libuv

* libuv

* path

* path

* path

* widgets

* build xeus-uv

* add uvloop

* debugger

* debugger

* remove xeus-uv after building

* special win env

* use winloop

* debug

* move

* debug

* native runner

* native runner

* native runner

* native runner

* remove uv

* fix debugger bug

* fix raw kernel

* fix raw kernel

* use one global dict

* fixes

* time based win

* time based win

* time based win

* first c++ tests

* remove activation

* remove activation

* remove activation

* remove activation

* remove activation

* dont build extension

* use dummy in stop

* activate

* build extension again

* build extension again

* use reader

* use reader

* use reader

* use reader

* fix

* fix

* fix

* fix

* fix

* fixes

* fixes

* fixes

* fixes

* fixes

* fixes

* fixes

* fixes

* fixes

* more

* more

* more

* more

* more

* more

* more

* more

* more

* more

* more

* more

* more

* more info

* more info

* even more

* even more

* even more

* no more specta

* no more specta

* no more specta

* no more specta

* no more specta

* no more specta

* win experiment

* win experiment

* win experiment

* use selector event loop

* win experiment

* win experiment

* adding default runner to xeus python st. we can add cout stuff

* missing break

* cleanup

* applied #685 to async pr

* added missing boost dependency

* ignore root build dirs

* added missing boost packages dependencies

* non-buisy

* retrigger-ci

* try buisy

* socket

* socket

* merged

* hidden

* add missing method

* hidden macro

* win fix

* debug duct tape and more info

* removed msvc-specific instruction

* tests wait for xpython's ready message instead of sleep

* debug duct tape and more info

* fi

* fix

* x6

* one minute

* added eval

* run tests 20 times for win

* powershell syntax

* use default runner

* publich error

* clean internal request impl

* remoev unused file in cmake

* fix info request

* fix typo like errors

* trigger run

* cleanup

* cleaner fix: lock python's GIL when destroying the debugger

* cleanup python path deduction unicode-friendly (on windows) and absolute paths

* removed buisy loop

* cleanup path

* cleanup pass 2

* toplevel await test

* cleanup

* cleanup

* cleanup

* cleanup

* trigger ci

* using released xeus-python-shell

* using released xeus-python-shell

---------

Co-authored-by: Isabel Paredes <isabel.paredes@quantstack.net>
Co-authored-by: Klaim (Joël Lamotte) <142265+Klaim@users.noreply.github.com>
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