This seems to have worked for the OP.
gdbserver :2345 ls > /dev/null 2>&1 &
I think the reason for this is because when a program is daemonized it closes all the STDIO 0,1 & 2\. The next IO to open will be 0. If the program tries to use 0,1 or 2 with things like printf or scanf it will be acting on the wrong IO or a closed IO. For example if it is daemon-ized the socket opens on 0 were STDIN was and if the printf is called it will be writing to a non-open FD what would cause the program to crash.