fork: Add a utility to fork a task to bg

This commit is contained in:
Salt 2019-09-25 00:57:10 -05:00
parent 22fb9cebb3
commit d383901d8e

18
fork Executable file
View File

@ -0,0 +1,18 @@
#! /bin/sh
#
# fork
# Fork a task to bg without terminal spew
# Copyright (C) 2019 Vintage Salt <rehashedsalt@cock.li>
#
# Distributed under terms of the MIT license.
#
if [ -z "$@" ]; then
printf "$0: requires argument\\n"
fi
(
exec 0>/dev/null 1>&0 2>&0 "$@"
)&
disown
exit 0