root/branches/release-30/mt-testbg.cgi

Revision 1174, 0.8 kB (checked in by bchoate, 11 months ago)

Updated copyright year for source.

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
Line 
1 #!/usr/bin/perl -w
2
3 # Movable Type (r) Open Source (C) 2001-2008 Six Apart, Ltd.
4 # This program is distributed under the terms of the
5 # GNU General Public License, version 2.
6 #
7 # $Id$
8
9 use strict;
10
11 local $| = 1;
12 print "Content-Type: text/html\n\n";
13 print "<html>\n<body>\n<pre>\n\n";
14
15 eval {
16     local $SIG{__WARN__} = sub { print "**** WARNING: $_[0]\n" };
17
18     my $pid = fork();
19     if (defined $pid)
20     {
21         if ($pid) {
22             print wait() > 0
23                    ? "Background tasks are available\n"
24                    : "Background tasks are not available\n";
25         } else {
26             sleep 1;
27             exit(0);
28         }
29     } else { print "Background tasks are not available\n"; }
30 };
31 print "Got an error: $@" if $@;
32
33 print "\n\n</pre>\n</body>\n</html>";
34
Note: See TracBrowser for help on using the browser.