Skip to content

Instantly share code, notes, and snippets.

View deniszh's full-sized avatar

Denis Zhdanov deniszh

View GitHub Profile
@deniszh
deniszh / set_nofile_limit.c
Created November 13, 2018 13:52 — forked from carlhoerberg/set_nofile_limit.c
Set nofile limit for a running process
#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)