Skip to content

Comment on Code that will only execute once

Comments

My first thought (from a sysadmin view, and only reading the title ;) ) is - firstboot scripts that only run once? The question sounds like they're looking for something a little more malicious I guess?...

Actually, bootscripts would probably count. The authors here mean code that can only run once and will unconditionally fail if it is executed more than once (such as #!/bin/rm), but a few of the examples can only be run once per session, which bootscripts would likely fit in.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.