In Linux often times a sub-process or thread (light weight sub process) will appear bellow the parent with the exact same signature and look like there are two or more of the same processes running.
If you do a
ps -efH | grep a.out
you should see that tree structure, you can also observe it in htop by turning on the tree view (F5). Or do a
pstree -clap <pid of parent process>
You can use the parent terminal process too, it will give you the process and all its children. So from the terminal you are about to run a.out do
that will give you its process, start a.out then in another terminal use the process id you just got in the pstree command.