Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix an issue where closing a subprocess started via InputOutputLocalProcess could lead to spurious error messages by that subprocess #5666

Merged
merged 1 commit into from
Mar 12, 2024

Conversation

fingolfin
Copy link
Member

Otherwise we see issues like this on Linux:

gap> d := DirectoryCurrent();;
gap> f := Filename(DirectoriesSystemPrograms(), "rev");;
gap> s := InputOutputLocalProcess(d,f,[]);;
gap> Sleep(1);
gap> CloseStream(s); Print("\n");
rev: stdin

See oscar-system/GAP.jl#971 by @ThomasBreuer

Otherwise we see issues like this on Linux:

    gap> d := DirectoryCurrent();;
    gap> f := Filename(DirectoriesSystemPrograms(), "rev");;
    gap> s := InputOutputLocalProcess(d,f,[]);;
    gap> Sleep(1);
    gap> CloseStream(s); Print("\n");
    rev: stdin
@fingolfin fingolfin added kind: bug Issues describing general bugs, and PRs fixing them topic: kernel labels Mar 8, 2024
@fingolfin fingolfin force-pushed the mh/kill-before-close branch from f92de30 to 458b8a5 Compare March 8, 2024 18:18
@ChrisJefferson
Copy link
Contributor

There is no perfect way to shut down child processes, but this seems better than before, and I can't find any way it is worse than before.

@fingolfin fingolfin added the release notes: use title For PRs: the title of this PR is suitable for direct use in the release notes label Mar 11, 2024
@fingolfin fingolfin changed the title kernel: kill subprocess before closing pipe to it Fix an issue where closing a subprocess started via InputOutputLocalProcess could lead to spurious error messages by that subprocess Mar 12, 2024
@fingolfin fingolfin merged commit c8e9ab4 into gap-system:master Mar 12, 2024
25 checks passed
@fingolfin fingolfin deleted the mh/kill-before-close branch March 12, 2024 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug Issues describing general bugs, and PRs fixing them release notes: use title For PRs: the title of this PR is suitable for direct use in the release notes topic: kernel
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants