forked from dlang/phobos
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into stable
- Loading branch information
Showing
36 changed files
with
5,690 additions
and
475 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
Add `std.process.Config.preExecDelegate` | ||
|
||
$(LINK2 $(ROOT_DIR)phobos/std_process.html#.Config.preExecDelegate, `std.process.Config.preExecDelegate`) | ||
is just like | ||
$(LINK2 $(ROOT_DIR)phobos/std_process.html#.Config.preExecFunction, `std.process.Config.preExecFunction`), | ||
but can capture an environment, for example: | ||
|
||
------- | ||
import core.sys.linux.sys.prctl : PR_SET_PDEATHSIG, prctl; | ||
import std.process : Config, execute; | ||
|
||
void runProgram(int pdeathsig) | ||
{ | ||
execute( | ||
["program"], | ||
config: Config( | ||
preExecDelegate: () @trusted => | ||
prctl(PR_SET_PDEATHSIG, pdeathsig, 0, 0, 0) != -1, | ||
), | ||
); | ||
} | ||
------- | ||
|
||
`preExecFunction` is retained for backwards compatibility. If both | ||
`preExecFunction` and `preExecDelegate` are given, both are called. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.