Skip to content

Instantly share code, notes, and snippets.

View vfreex's full-sized avatar

Yuxiang Zhu vfreex

View GitHub Profile
@vfreex
vfreex / list.h
Created December 13, 2016 08:09 — forked from evanslai/list.h
Linux kernel linked list, modified for userspace
#ifndef _LINUX_LIST_H
#define _LINUX_LIST_H
#include <stdio.h>
#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
/**
* container_of - cast a member of a structure out to the containing structure
* @ptr: the pointer to the member.
@vfreex
vfreex / README.md
Created December 6, 2016 07:42
What happens when you cancel a Jenkins job

When you cancel a Jenkins job

Unfinished draft; do not use until this notice is removed.

We were seeing some unexpected behavior in the processes that Jenkins launches when the Jenkins user clicks "cancel" on their job. Unexpected behaviors like:

  • apparently stale lockfiles and pidfiles
  • overlapping processes
  • jobs apparently ending without performing cleanup tasks
  • jobs continuing to run after being reported "aborted"