Skip to content

Instantly share code, notes, and snippets.

@sherpc
Last active December 11, 2015 15:28
Show Gist options
  • Save sherpc/4620751 to your computer and use it in GitHub Desktop.
Save sherpc/4620751 to your computer and use it in GitHub Desktop.
// for Morozov
void RetSignal(int status) {
if (WIFEXITED(status))
;
else if (WIFSIGNALED(status)) {
printf("ERROR: return signal %d\n", WTERMSIG(status));
}
else if (WIFSTOPPED(status)) {
printf("STOP: return signal %d\n", WSTOPSIG(status));
}
}
// for Prohorenko
if (listen(s, 1) == -1) { perror("listen"); exit(1); }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment