Passing pointers to workers process results in null pointers

Hi all,

I am writing a code to spawn an image acquisition routine on a worker process by passing a pointer pointing to a camera device. This pointer is used by C APIs to execute camera operations via ccall. The problem is, when a pointer Ptr{} is sent to a remote process, it is always set to NULL - 0x000000000000000, which makes the programs crash. Does anybody have a workaround for this issue?

Thanks a lot

technically you can send a number and convert it back, really hacky though

julia> a
1-element Vector{Int64}:
 1

julia> Ptr{Int64}(UInt(pointer(a))) == pointer(a)
true

also, do different processes have access to same memory space?

also, do different processes have access to same memory space?

Yes, you are right. Should I put the camera handle in the shared memory space then?

if you’re in Linux I would assume the camera is abstracted as a /dev file handler by the OS, but idk the details, just guessing here

Thanks a lot!