File: cfbg.in

package info (click to toggle)
cfengine 1.4.9-3
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 3,540 kB
  • ctags: 1,861
  • sloc: ansic: 25,408; sh: 1,708; perl: 1,088; lex: 690; makefile: 435; lisp: 182; yacc: 101; csh: 24
file content (20 lines) | stat: -rw-r--r-- 318 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!@PERL@
#
# Place the command on the remainder of the line
# into the background, to avoid blocking cfengine.
# Must discard output...

$command = join(" ",@ARGV);
$outputfile = "/tmp/cfbg.out";

 #
 # Perl forks child from here onwards
 #

if (!fork())
   {
   exit 0;
   }

 system "$command >> $outputfile 2>&1";