Skip to content
Myr

protector_openbsd.go

This file

Path

src/protector/protector_openbsd.go

10 lines · 203 bytes · Go

Last changed by

Add pledge(2) support (OpenBSD only) via a 'protector' package. (#1297)Aaron Bieberbefore adoptiona1bcdc2

History of this file

Take it

Add pledge(2) support (OpenBSD only) via a 'protector' package. (#1297)Aaron Bieberbefore adoptiona1bcdc2

lines 1–10why, one step back
1// +build openbsd
23package protector45import "golang.org/x/sys/unix"67// Protect calls OS specific protections like pledge on OpenBSD8func Protect() {9 unix.PledgePromises("stdio rpath tty proc exec")10}