reset on serial port open

Is it possible to keep a sketch running (without a new SETUP) when opening/closing/re-opening a serial comm port?

have a look at this post

Hi,
The 120 ohm resistor as pull-up stops the bosrd completel. so does a 240 ohm.
I'm running an Adafruit Metro-Mini which is supposed to be a Uno clone,right?
Any other ideas?
tof

I have a MEGA that i managed to prevent from resetting by putting a 10uF capacitor on the reset pin (+) through a switch to GND. I can't remember where i found the solution, it's been a few years.

On a Nano, I use a SPST slide switch to switch a 100nF cap to the reset pin to prevent reset on serial connect, switch OFF to program. In the picture, the red wire goes from +5V to one side of sw to keep cap charged when OFF, orange from other side to RESET pin, cap from center switch pin to GND.
cap_sw.pngcap_n_sw.png

cap_sw.png

cap_n_sw.png