Skip to content

Instantly share code, notes, and snippets.

Avatar

Denis Zhdanov deniszh

View GitHub Profile
@deniszh
deniszh / set_nofile_limit.c
Created Nov 13, 2018 — forked from carlhoerberg/set_nofile_limit.c
Set nofile limit for a running process
View set_nofile_limit.c
#define _GNU_SOURCE
#define _FILE_OFFSET_BITS 64
#include <stdio.h>
#include <time.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/resource.h>
#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \
} while (0)