Skip to content

Instantly share code, notes, and snippets.

View Ljohn001's full-sized avatar

Ljohn Ljohn001

  • Shanghai
View GitHub Profile
@jiewei-ke
jiewei-ke / 0.1911392-ext4-deadlock
Last active April 17, 2023 06:45
This gist repo is about an ext4 deadlock issue which may be happened when OOM killer is triggered on CentOS 7 with version after 3.10.0-862.el7.
# ext4 deadlock issue
## 0. Background
This gist repo is about an ext4 deadlock issue which may be happened when OOM
killer is triggered on CentOS 7 with version after 3.10.0-862.el7.
See https://bugzilla.redhat.com/show_bug.cgi?id=1911392 for more details.
## 1. How to reproduce this issue?
@nchaigne
nchaigne / build-gcc-7.3.0-on-rhel7.md
Last active April 19, 2024 11:54
Building GCC 7.3.0 on Red Hat Enterprise Linux 7

Building GCC 7.3.0 on Red Hat Enterprise Linux 7

Introduction

Red Hat Enterprise Linux (RHEL) distribution ships with a somewhat outdated version of the GCC compiler (4.8.3 on RHEL 7.1), which may not be suitable to your compilation requirements. For example, C11 - which supersedes C99 - is fully supported only starting from GCC 4.9).

Additionally, recent versions of GCC (GCC6, GCC7) come with improvements which help detect issues at build time and offer suggestions on how to fix them. Sometimes, these are even actually helpful!

This note describes how to build the latest GCC (7.3 as of January 2018) from sources on RHEL 7. This should be applicable as is on CentOS 7. For other Linux distributions, adapt as needed.

@shawnrice
shawnrice / skeleton-daemon.sh
Created April 19, 2014 07:22
A template to write a quick daemon as a bash script
#!/bin/sh
# This is a skeleton of a bash daemon. To use for yourself, just set the
# daemonName variable and then enter in the commands to run in the doCommands
# function. Modify the variables just below to fit your preference.
daemonName="DAEMON-NAME"
pidDir="."
pidFile="$pidDir/$daemonName.pid"