I think there are "zero aperture" diaphragms for use in microscopes, that close all the way? Somewhere I read about making an adjustable pinhole out of three or four razor blades.
As an aside, I've been wondering about the effects of non-circular pinholes, and whether they might have any artistic value, even if "sub-optimal". An obvious question would be the effect on sun flares, like the number of blades in a normal lens aperture affects the "sun star" flare. But it seems to me you might get softness in one direction or some other effect that might be interesting to play with. Might be interesting to play around with.