Skip to content

Commit

Permalink
Merge pull request #7115 from kubo39/note-async-signal-safe-function
Browse files Browse the repository at this point in the history
Add comment for using non async-signal-safe function
  • Loading branch information
thewilsonator authored Jul 25, 2019
2 parents e123a4d + 8dc81bb commit 442ab4e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions std/process.d
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,10 @@ private Pid spawnProcessImpl(scope const(char[])[] args,

if (!(config & Config.inheritFDs))
{
// NOTE: malloc() and getrlimit() are not on the POSIX async
// signal safe functions list, but practically this should not
// be a problem. Tha Java VM and CPython also use malloc() in
// its own implementation.
import core.stdc.stdlib : malloc;
import core.sys.posix.poll : pollfd, poll, POLLNVAL;
import core.sys.posix.sys.resource : rlimit, getrlimit, RLIMIT_NOFILE;
Expand Down

0 comments on commit 442ab4e

Please sign in to comment.