You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sometimes we want to execute elevated JavaScript script instead of external process.
if there is something like child_process.fork() call, it will be great.
I've done something to simulate this ipc. it's ugly and not robust, but works for me.
it will break normal stdin/stdout since I'm using this to transfer messages. I don't know what does node.js native child_process ipc implement, maybe unixsock or named pipe?
sometimes we want to execute elevated JavaScript script instead of external process.
if there is something like child_process.fork() call, it will be great.
documents about node.js native fork and ipc:
https://nodejs.org/api/child_process.html#child_process_child_process_fork_modulepath_args_options
note that spawn support IPC too, just specific it in stdio
https://nodejs.org/api/child_process.html#child_process_options_stdio
and in child process
https://nodejs.org/api/process.html#process_process_send_message_sendhandle_options_callback
https://nodejs.org/api/process.html#process_event_message
I've done something to simulate this ipc. it's ugly and not robust, but works for me.
it will break normal stdin/stdout since I'm using this to transfer messages. I don't know what does node.js native child_process ipc implement, maybe unixsock or named pipe?
here is my code:
in index.js
in my elevated module
maotama.js
, I'm using this to send raw-socketand calling
The text was updated successfully, but these errors were encountered: