Skip to content

Instantly share code, notes, and snippets.

View unmanned-player's full-sized avatar

unmanned-player unmanned-player

View GitHub Profile
@unmanned-player
unmanned-player / detect-musl.sh
Last active October 22, 2024 22:24
Actually detecting musl library
#! /bin/sh
# SPDX-License-Identifier: WTFPL
# Actually detecting musl libc.
# How it works
# -------------
#
# WARNING - This is a hack and the concept will likely change in future.
@unmanned-player
unmanned-player / spawn_fork_test.c
Created March 12, 2020 08:59
A simple test case to benchmark fork() and posix_spawn()
/* Configurations. */
#define WITH_VFORK
// #define TRY_FORK
#define TRY_SPAWN
#define WAIT_PID
#define RUNS 1000
/* Code. */
#ifdef WITH_VFORK
#define _GNU_SOURCE 1