help-gnucap
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-gnucap] gnucap as a server?


From: dan chak
Subject: [Help-gnucap] gnucap as a server?
Date: 23 Apr 2003 02:19:15 -0400

I am trying to write a GUI front end for gnucap, but am trying to run
gnucap as a separate process rather than hack the gnucap souce code. 
The gnucap home page mentions that gnucap can be run as a server, but
then I can't find any other information about that.  Does anyone have
any information on how that is done?

What I'm trying to do right now is have my program write out .ckt files,
fork and spawn a gnucap process that should write to a .out file, and
then collect the data from the output file.  For some reason, I can't
get the exec call to work correctly with gnucap.  It behaves as if
gnucap is called without the -b option, never writes to the output file,
and gnucap never exits.

Here's what I'm trying to do:

------
unlink("/tmp/circuiTUI.out");
// run simulation
if (!fork()) {
  if (execl("/usr/local/bin/gnucap", "-b", "/tmp/circuiTUI.ckt", NULL)
== -1) {
     perror("Execl error");
  }
  exit(0);
};
wait(NULL);
-------

Here's what my circuiTUI.ckt file looks like:

-------
circuiTUI
V37 0 1 dc 5.000000
R41 1 0 1.000000
.print dc v(1)
.dc 0 10.00 0.2 > /tmp/circuiTUI.out
.end
-------

Any ideas?

thanks,
dan chak





reply via email to

[Prev in Thread] Current Thread [Next in Thread]