Groups 219 of 99+ julia-users › How to fork a child process and communicate low-level system calls between parent process (popen)? 6 posts by 4 authors Anthony Erlinger 6/15/14 I'm writing a package to allow a Julia program to asynchronously listen and respond to file change events on disk, but I've hit a bit of a stumbling block. I need a way to fork a Julia process and have it listen to specific OS system calls such as select, and then notify the parent process of the event. This is sometimes called 'popen' in other languages (http://www.ruby-doc.org/core-2.1.2/IO.html#method-c-popen). I'm aware that there are a bunch of functions for handling general IO (http://julia.readthedocs.org/en/latest/stdlib/base/#i-o) but they don't quite give me the control and interprocess communication that I'm looking for. There was also a short discussion about this a couple of years ago: https://groups.google.com/forum/#!topic/julia-dev/l-4HLYX2qSI. Was wondering if there have been any developments or if anyone else has some insight on this capability. Thanks! Alireza Nejati 6/15/14 It's my impression that to do this sort of stuff you should use Julia's built-in process creation/communication facilities. Have a look at this page: http://docs.julialang.org/en/release-0.1/manual/parallel-computing/ On Monday, June 16, 2014 10:57:28 AM UTC+12, Aerlinger wrote: I'm writing a package to allow a Julia program to asynchronously listen and respond to file change events on disk, but I've hit a bit of a stumbling block. I need a way to fork a Julia process and have it listen to specific OS system calls such as select, and then notify the parent process of the event. This is sometimes called 'popen' in other languages (http://www.ruby-doc.org/core-2.1.2/IO.html#method-c-popen). I'm aware that there are a bunch of functions for handling general IO (http://julia.readthedocs.org/en/latest/stdlib/base/#i-o) but they don't quite give me the control and interprocess communication that I'm looking for. There was also a short discussion about this a couple of years ago: https://groups.google.com/forum/#!topic/julia-dev/l-4HLYX2qSI. Was wondering if there have been any developments or if anyone else has some insight on this capability. Thanks! Kevin Squire 6/15/14 Re: [julia-users] Re: How to fork a child process and communicate low-level system calls between parent process (popen)? On Sun, Jun 15, 2014 at 4:54 PM, Alireza Nejati wrote: It's my impression that to do this sort of stuff you should use Julia's built-in process creation/communication facilities. Have a look at this page: http://docs.julialang.org/en/release-0.1/manual/parallel-computing/ That's a pretty old version of the manual. You're better off with http://julia.readthedocs.org/en/latest/manual/parallel-computing/ Cheers, Kevin On Monday, June 16, 2014 10:57:28 AM UTC+12, Aerlinger wrote: I'm writing a package to allow a Julia program to asynchronously listen and respond to file change events on disk, but I've hit a bit of a stumbling block. I need a way to fork a Julia process and have it listen to specific OS system calls such as select, and then notify the parent process of the event. This is sometimes called 'popen' in other languages (http://www.ruby-doc.org/core-2.1.2/IO.html#method-c-popen). I'm aware that there are a bunch of functions for handling general IO (http://julia.readthedocs.org/en/latest/stdlib/base/#i-o) but they don't quite give me the control and interprocess communication that I'm looking for. There was also a short discussion about this a couple of years ago: https://groups.google.com/forum/#!topic/julia-dev/l-4HLYX2qSI. Was wondering if there have been any developments or if anyone else has some insight on this capability. Thanks! Jameson 6/15/14 Re: [julia-users] Re: How to fork a child process and communicate low-level system calls between parent process (popen)? It's is unclear what you are asking for. The Julia Base library includes a high-performance, cross-platform framework for responding to file change events on disk. (see base/poll.jl) Interprocess communication is done through the creation of a named pipe. (see base/spawn.jl for examples) popen is unrelated to fork, select, or file notification. although the equivalent call in julia is more object-based, around the Cmd object and backtick (`) notation, and functions such as run, spawn, and open - show quoted text - Alireza Nejati 6/15/14 Kevin: Thanks, yeah I didn't pay any attention to the version On Monday, June 16, 2014 10:57:28 AM UTC+12, Aerlinger wrote: I'm writing a package to allow a Julia program to asynchronously listen and respond to file change events on disk, but I've hit a bit of a stumbling block. I need a way to fork a Julia process and have it listen to specific OS system calls such as select, and then notify the parent process of the event. This is sometimes called 'popen' in other languages (http://www.ruby-doc.org/core-2.1.2/IO.html#method-c-popen). I'm aware that there are a bunch of functions for handling general IO (http://julia.readthedocs.org/en/latest/stdlib/base/#i-o) but they don't quite give me the control and interprocess communication that I'm looking for. There was also a short discussion about this a couple of years ago: https://groups.google.com/forum/#!topic/julia-dev/l-4HLYX2qSI. Was wondering if there have been any developments or if anyone else has some insight on this capability. Thanks! Anthony Erlinger 6/16/14 Re: [julia-users] Re: How to fork a child process and communicate low-level system calls between parent process (popen)? Great, thanks for the info on base/poll.jl - show quoted text -