Skip to content

Instantly share code, notes, and snippets.

@skeeto
skeeto / testenv.cpp
Created September 30, 2024 23:22
Quick test of environment variable passing
// Quick test of environment variable passing
// $ cc -nostartfiles -o testenv testenv.cpp
// $ cl testenv.cpp /link /subsystem:console kernel32.lib
//
// Spawns a copy of itself with a custom-built environment block, and
// the spawned child examines/probes that block.
//
// This is free and unencumbered software released into the public domain.
typedef int I;