NodeJS — Fork Child Process with function string instead of file
问题 I've looked at the documentation for the fork method, and it only describes providing a file path to the child module file. Does anyone know if it is possible (and undocumented) to pass in the child module directly instead of via a file? Point being, I would like to dynamically generate the module, then create a child process with it. 回答1: This would not be possible -- fork() creates a completely different process that do not share context or variables with its parent process. One option you