#! /usr/bin/perl # IBM_PROLOG_BEGIN_TAG # This is an automatically generated prolog. # # # # Licensed Materials - Property of IBM # # (C) COPYRIGHT International Business Machines Corp. 2009,2019 # All Rights Reserved # # US Government Users Restricted Rights - Use, duplication or # disclosure restricted by GSA ADP Schedule Contract with IBM Corp. # # IBM_PROLOG_END_TAG # @(#)91 1.2 src/rsct/caa/test/ahafs_sim_client.perl, topology.services, rsct_rady, rady2035a 8/14/09 10:40:10 use IO::Socket; use Getopt::Long; my $path, $help; if (!GetOptions("path=s" => \$path, "help" => \$help)) { usage(1); } # # The unix domain socket path must be specified. # if (! $path) { usage(1); } STDOUT->autoflush(1); # # Create the unix domain socket. # my $socket = new IO::Socket::UNIX(Peer => $path) or die sprintf("%d: couldn't create the socket", __LINE__); $socket->autoflush(1); print $socket "CHANGED=YES\n"; while (<$socket>) { print; } $socket->shutdown(2); $socket->close(); sub usage { print STDERR < [--help] USAGE if (undef ne $_[0]) { exit $_[0]; } }