if ((pid = fork()) < 0) {
perror("Fehler beim forken des Prozesses");
exit(EXIT_FAILURE);
} else if (pid == 0) {
socket = connectToClient(config.hostname, config.portNumber);
performHandshake(socket, gameId, spielerAnzahl);
close(socket);
} else {
// implement me
}
hi guys so i ive read abit the man page. If fork() returns 0 im in the child process and if it returns > 0 than im in the parent process (it returns the pid of the child process there)
Does the child process never know its own pid?