Strange issue I've been dealing with for a few hours here, thought I would post instead of just lurking since I've got a lot of good info from reading threads here!

I have a program that forks itself to create a worker which it communicates with over a set of pipes. The forked process starts fine and begins its work, which involves making libcurl requests and sending the results back to the parent process over one of the pipes.

The issue I'm running into is that, while this all works fine when run outside of gdb, as soon as I run it under gdb, signal 17 (SIGCHLD) is raised, from what I can tell it looks like during the libcurl request. My code catches the signal and restarts the worker, which crashes at the same point.

I'm pretty new with gdb, so I'm not sure how to go about debugging this or what could possibly cause this signal to be fired only when run under gdb. It doesn't make a lot of sense to me.

A crash does occur after the program has run for several minutes, but this seems unrelated (I'm sure it's related).

Hoping someone has seen something similar where this kind of signal shows up during gdb debugging unexpectedly, and might be able to send me in the right direction.

Thanks for any input!