2 #########################################################################
4 #*************************************************************************
6 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
8 # Copyright 2008 by Sun Microsystems, Inc.
10 # OpenOffice.org - a multi-platform office productivity suite
12 # $RCSfile: verify_sane.pl,v $
16 # This file is part of OpenOffice.org.
18 # OpenOffice.org is free software: you can redistribute it and/or modify
19 # it under the terms of the GNU Lesser General Public License version 3
20 # only, as published by the Free Software Foundation.
22 # OpenOffice.org is distributed in the hope that it will be useful,
23 # but WITHOUT ANY WARRANTY; without even the implied warranty of
24 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 # GNU Lesser General Public License version 3 for more details
26 # (a copy is included in the LICENSE file that accompanied this code).
28 # You should have received a copy of the GNU Lesser General Public License
29 # version 3 along with OpenOffice.org. If not, see
30 # <http://www.openoffice.org/license.html>
31 # for a copy of the LGPLv3 License.
33 #*************************************************************************
35 ####################################################################
36 # File Name: template.pl
39 # Author : Brian Cameron
40 # Date : 5th Sept. 2001
43 # Takes x and y from the command line and taps the screen there.
44 # Assumes pose is already running.
46 ##########################################################################
48 use POSIX
"sys_wait_h"; # Need this for waitpid with WNOHANG
49 use EmRPC
; # EmRPC::OpenConnection, CloseConnection
55 print "\nUsage: $0 timeout\n\n";
61 if (!defined($up_pid = fork()))
63 print "ERROR, problem forking.\n"
67 print "\nChecking to see if pose is started properly.\n";
73 waitpid($up_pid, WNOHANG
);
77 print "Pose did not start successfully...\n";
83 # The child process exited okay, so we know it will not
84 # hang...but the open_connection will just die if pose
85 # isn't started...so try it in the parent.
90 print "Verified pose started successfully...\n";
96 # Child process - Try to open/close the connection. This
97 # can hang if pose did not start properly...
105 print "opening connection\n";
106 EmRPC
::OpenConnection
(6415, "localhost");
111 print "closing connection\n";
112 EmRPC
::CloseConnection
();