A child created via fork(2) inherits a copy of its parent's signal dispositions. During an execve(2), the dispositions of handled signals are reset to the default; the dispositions of ignored signals are left unchanged.
взаимодействие через stdin и stdout это норм, но не всегда удобно, конечно если бы у функций и всего остального было бы не только возвращаемый код и но и значение...