Skip to content

Commit 0dec7f3

Browse files
committed
Document the correct way to check if fork is available
PullRequest: truffleruby/490
2 parents d95f1e2 + c18cff1 commit 0dec7f3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

doc/user/compatibility.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ as their semantics fundamentally do not match the technology that we are using.
4444

4545
You cannot `fork` the TruffleRuby interpreter. The feature is unlikely to ever
4646
be supported when running on the JVM, but could be supported in the future on
47-
the SVM.
47+
the SVM. The correct and portable way to test if `fork` is available is:
48+
```ruby
49+
Process.respond_to?(:fork)
50+
```
4851

4952
#### Standard libraries
5053

0 commit comments

Comments
 (0)