Why does Rust executable not run new instance of program

During development, I find I cannot run 2 different versions of my compiled Rust program at the same time.
For example if I start

  1. /target/release/MyProgram and then
  2. /target/debug/MyProgram
    The second invocation actually just starts a new instance of the already running release version.

I always thought the binary was basically a statically linked independent executable but that appears not to be the case.

This is on latest Fedora Linux with Gnome.

what makes you believe this?

check the hashes of those files, they should certainly be different.

also, describing an executible compiled by rustc as "the rust executible" is confusing, to say the least.

to answer about linkage, dependancies written in rust will be statically linked, but system libraries (such as libc) many be linked dynamically, depending on platform.

Is this a GLib or GTK app? If so, you need to configure the app with the NON_UNIQUE flag when creating it, to allow multiple instances at once.

2 Likes

So it is a GTK thing. That makes much more sense.