[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: gEDA-user: gnetlist quitting after execl call
On Sep 6, 2010, at 1:08 PM, Oliver King-Smith wrote:
> I am extending gnetlist and I dislike scheme. To work around this I
> wrote a little program in C++ to do the heavy lifting and I am trying
> to call it from my scheme extension to gnetlist.
> I wrote the following function in scheme:
> (define magic:write_nmos_fet
> (lambda (w l m)
> (display (string-append "in write_nmos_fet " (number->string w)
> "\n") )
>
> (execl "/sw/share/gEDA/scheme/subfunction" " --m=" (number->string
There's your problem: (execl) is not like a call. It replaces the current process, so it should never return unless something goes wrong. Like execl() in libc.
You probably want (system) or (system*).
> m)
> " --w=" (number->string w) " --l=" (number->string l) "
> --type=nmos" )
> (display "Finished C call\n" )
> ))
> This works and calls my C++ program (called subfunction right now).
> The C++ program runs without problems and produces the expected
> output. My problem is nothing seems to run in my scheme program after
> calling subfunction. For example the line:
> (display "Finished C call\n" )
> does not run. Nothing else appears to run after this. However there
> are no error messages.
> Does anyone have any suggestions as to why this might be?
> Is there a better way to be calling external programs from gnetlist?
> Oliver
>
>
> _______________________________________________
> geda-user mailing list
> geda-user@xxxxxxxxxxxxxx
> http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
John Doty Noqsi Aerospace, Ltd.
http://www.noqsi.com/
jpd@xxxxxxxxx
_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user