fork();
if (pid < 0) {
error();
} else if (pid == 0) {
exec();
error();
exit(EXIT_FAILURE);
}
wait();
so pid should be 0. i just checked for -1
and what is that wait?
Обсуждают сегодня