Conversation
This gem no longer build on the latest clang version:
```
posix-spawn.c:226:27: error: incompatible function pointer types passing 'int (VALUE, VALUE, posix_spawn_file_actions_t *)' (aka 'int (unsigned long, unsigned long, void **)') to parameter of type 'int
(*)(VALUE, VALUE, VALUE)' (aka 'int (*)(unsigned long, unsigned long, unsigned long)') [-Wincompatible-function-pointer-types]
rb_hash_foreach(options, posixspawn_file_actions_operations_iter, (VALUE)fops);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/rubies/3.4-dev-03-19/include/ruby-3.4.0+0/ruby/internal/intern/hash.h:83:40: note: passing argument to parameter 'func' here
void rb_hash_foreach(VALUE hash, int (*func)(VALUE key, VALUE val, VALUE arg), VALUE arg);
```
It's also unnecessary given Ruby's `Process.spawn` use `vfork(2)` so
it's essentially the same as `posix-spawn`. The only difference is that
Ruby fallback to using `fork(2)` when running as root, but that's not something
that should be common. Other than that there is no perf gain to use `posix-spawn` gem.
Contributor
|
I'll handle the version bump now |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ref: rtomayko/posix-spawn#93
This gem no longer build on the latest clang version:
It's also unnecessary given Ruby's
Process.spawnusevfork(2)so it's essentially the same asposix-spawn. The only difference is that Ruby fallback to usingfork(2)when running as root, but that's not something that should be common. Other than that there is no perf gain to useposix-spawngem.