-
Notifications
You must be signed in to change notification settings - Fork 192
Support :chdir in #spawn #1492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks for the report! This is unfortunately a known limitation in TruffleRuby. Incidentally, we were just discussing what we can do about it a few days back. The core issue is we don't support Unfortunately, approaches like changing the directory, performing the spawn, and then changing back to the previous directory suffer from race conditions in the presence of multiple running threads. Anyway, it's something for us to sort out and we're aware we need to. I'm hopeful we'll work out a solution soon. |
I understand, I just didn't see any mention of it in the doc so I thought I'd report it. It's not obvious that not supporting fork means no :chdir. At least someone searching may find this explanation now. I wish I could help, but other than providing a random workaround that you guys probably already thought of and discarded, I got nothing. (Can't you |
Your suggestion is what we've converged on. One of us will try that approach out next week. Not shipping an extra binary would be preferable, but we were unable to come up with a reasonable solution otherwise. "Reasonable" here means not incurring a bunch of overhead. |
I'll try to take a look at this this week. |
FWIW JRuby uses I think the best approach here is having a small executable doing It seems |
FYI, TruffleRuby 19.3.0 was released and should fix this. |
Right now,
spawn('echo hi', chdir: '/home')
is plain refused in TruffleRuby.truffleruby 1.0.0-rc9, like ruby 2.4.4, GraalVM CE Native [x86_64-linux]
The text was updated successfully, but these errors were encountered: