summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorAndrew Gaffney <agaffney@gentoo.org>2007-12-23 08:08:30 +0000
committerAndrew Gaffney <agaffney@gentoo.org>2007-12-23 08:08:30 +0000
commit6c82a76b912c7a15ab58b339e7dfb511687846fa (patch)
tree769e2b609713328f0f96a85b7b363ade7cd8f126 /client
downloadscire-6c82a76b912c7a15ab58b339e7dfb511687846fa.tar.gz
scire-6c82a76b912c7a15ab58b339e7dfb511687846fa.tar.bz2
scire-6c82a76b912c7a15ab58b339e7dfb511687846fa.zip
initial perl-based client and server with shiny IPC
svn path=/branches/new-fu/; revision=252
Diffstat (limited to 'client')
-rwxr-xr-xclient/scireclient.pl23
1 files changed, 23 insertions, 0 deletions
diff --git a/client/scireclient.pl b/client/scireclient.pl
new file mode 100755
index 0000000..abf5f3f
--- /dev/null
+++ b/client/scireclient.pl
@@ -0,0 +1,23 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use IPC::Open2;
+
+my $jobdir = "/tmp/scirejobs";
+my $servercmd = "../server/scireserver.pl";
+
+if(! -d $jobdir) {
+ print "WARNING! ${jobdir} does not exist...creating\n";
+ mkdir $jobdir, 0660;
+}
+
+my $pid = open2(*server_stdout, *server_stdin, $servercmd);
+
+for(('PING', 'FOO', 'QUIT')) {
+ print "Sending: $_\n";
+ print server_stdin "$_\n";
+ my $response = <server_stdout>;
+ print "Got: ${response}";
+}