[Issue 24824] New: std.process.browse returns on failure in forked child

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Oct 22 02:10:10 UTC 2024


https://issues.dlang.org/show_bug.cgi?id=24824

          Issue ID: 24824
           Summary: std.process.browse returns on failure in forked child
           Product: D
           Version: D2
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: major
          Priority: P1
         Component: phobos
          Assignee: nobody at puremagic.com
          Reporter: schveiguy at gmail.com

On posix platforms besides OSX, std.process.browse uses a fork/exec to open a
browser window.

When this fails, it's the exec that fails. However, the function returns
instead of exits. This means it keeps executing whatever it was doing in the
parent process when `browse` was called! And with only one thread, with
everything else in the process still allocated/opened.

This is disastrous. The process should exit right away.

Technically this should be redone to use std.process utilities directly, but I
just want to make sure this bug is fixed, so I'm making a separate bug.

I'll open a separate issue on the enhancement to replace browse internals with
std.process regular functions. That originally was captured in issue 6496, but
that was closed incorrectly.

--


More information about the Digitalmars-d-bugs mailing list