Skip to content
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

xs-vat-worker limited to one at a time? (hard-coded fd 3, 4) #1616

Closed
dckc opened this issue Aug 25, 2020 · 4 comments
Closed

xs-vat-worker limited to one at a time? (hard-coded fd 3, 4) #1616

dckc opened this issue Aug 25, 2020 · 4 comments
Assignees
Labels
bug Something isn't working SwingSet package: SwingSet

Comments

@dckc
Copy link
Member

dckc commented Aug 25, 2020

context: #1407 (comment)

cc @warner

@dckc dckc added the bug Something isn't working label Aug 25, 2020
@warner
Copy link
Member

warner commented Aug 25, 2020

yeah we should add command-line arguments to specify the fds that the child should use, the parent will allocate a pair for each worker process it launches and tell the child what it picked

@warner warner added the SwingSet package: SwingSet label Aug 25, 2020
@dckc
Copy link
Member Author

dckc commented Aug 26, 2020

I wonder... Many children can each have fd 3 and 4, no?

@warner
Copy link
Member

warner commented Aug 26, 2020

Yeah, but the parent cannot. But, now you're making me wonder how this really works, and whether the FD numbers have to be the same in both child and parent (I know it's doing fork/exec, but the parent process could close/fdup to reassign the numbers before it execs the child). I wrote code to do this in Twisted 20 years ago, but for the life of me I don't remember what I did.

We'll have to check the Node.js spawn docs to see if this is strictly necessary.

@dckc
Copy link
Member Author

dckc commented Oct 14, 2020

@warner tells me he found that node does The Right Thing in the parent so that the fds in the child can stay hard-coded.

Until we learn otherwise, I'm closing this.

@dckc dckc closed this as completed Oct 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working SwingSet package: SwingSet
Projects
None yet
Development

No branches or pull requests

2 participants