repetition of the +1 can be avoided: <code> (sd > signal_pipe ? sd : signal_pipe) + 1; </code>