Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exit with code 124 if the process is interrupted eg with C-c. #117

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/cpulimit.c
Expand Up @@ -108,7 +108,7 @@ static void quit(int sig)
//fix ^C little problem
printf("\r");
fflush(stdout);
exit(0);
exit(124);
}

//return t1-t2 in microseconds (no overflow checks, so better watch out!)
Expand Down
1 change: 1 addition & 0 deletions src/process_group.c
Expand Up @@ -19,6 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

#include <libgen.h>
#include <string.h>
#include <stdlib.h>
#include <limits.h>
Expand Down
1 change: 1 addition & 0 deletions tests/process_iterator_test.c
Expand Up @@ -19,6 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

#include <libgen.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
Expand Down