title: Attaching to gdb interupts and won't continue the process
body: <p>got some big real time project to deal with (multiple processes (IPCs), multi Everything in short).</p>
  
  <p>My working on process is started as service on Linux. I have the root access. </p>
  
  <p><strong>Here is the problem:</strong> </p>
  
  <p>I'm trying to attach to a running proc, tried starting it through/with gdb but the result is the same: it stops the executable once I "touched" it with gdb or sometimes it throws:</p>
  
  <pre><code>Program received signal SIGUSR1, User defined signal 1. [Switching to Thread 0x7f9fe869f700 (LWP 2638)]
  </code></pre>
  
  <p>of course from there nothing can be done.</p>
  
  <p>Tried:</p>
  
  <ol>
  <li>handle all nostop</li>
  <li>attach to launched as service (daemon) or launched as regular proc</li>
  <li>started from gdb</li>
  <li>thought maybe forking/multi-threaded problem - implemented in the very beginning sleep for 10 seconds - attached to it with "continue"</li>
  </ol>
  
  <p>Guys, all I want it is to debug, hit the breakpoints, etc.</p>
  
  <p>Please help! Share ideas.</p>
  
  <p>Editing actual commands: </p>
  
  <p>1)  <strong>gdb attach myProcId.</strong> Then after reading symbols, I hit "c" which results:</p>
  
  <p>Program received signal SIGUSR1, User defined signal 1.
  [Switching to Thread 0x7f9fe869f700 (LWP 2638)]
  0x00007f9fec09bf73 in select () from /lib64/libc.so.6</p>
  
  <p>2) If I make the first line 10 seconds sleep in the code, attaching to the process, hit "c", result: it runs, shows info threads, backtrace of main, but never hits the breakpoint (for sure the code runs there - I get logs and different behaviour if I change code there), meaning the process is stuck.  </p>
  
  <p>3) All other combinations like <strong>gdb path/to/my/proc</strong> args list,  then start. Where arg list played with different related options gdb gives us.</p>
  
  <p>Maybe worth to mention: process network packets related, timers driven also. 
  But for me the important thing is a current snapshot on break, i don't care what will happen to the system after timers expired. </p>