Cdg Server

Description

I try to build a cdgp-server in perl which can handle different cdgp-processes at the same time. Following commands should be provided:

  • NEW - open a cdgp-process
  • SCRIPT - commands for an existing cdg-process
  • STATUS - gives a list over all processes
  • CPU - CPU load
  • QUIT the server

At the moment I try to implement "NEW". Some problems occur: What is wanted is a bidirectional Communication betweeen the server and the cdg-processes. Intuitively one could write something as the following: open(PROG_FOR_READING_AND_WRITING, "| cdgp |") But, of course, that's not possible.

If you consult the perlipc-manual, you are given different approaches to solve the problem:
  1. use of open2() or open3() Unix buffering may make this strategy unprofitable
  2. the nonstandard library Comm.pl
  3. Expect.pm

I tried the open2(), but it doesn't work because of buffering. Now the same project not in perl but in tcl.

Comments

 

 
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback