[Starkit] Re: starpack as cgi
Schofield, Bryan (GE Trans)
Bryan.Schofield at trans.ge.com
Wed Jun 22 09:45:34 CEST 2005
This may no be applicable for you, but I general do starkit cgi as follows.
1. Stick a tclkit in my ~/public_html/cgi directory.
2. Add my starkit to ~/public_html/cgi directory.
3. Create a 3 line cgi shell script to launch my starkit.
> ls ~/public_html/cgi
tclkit foo.cgi foo.kit bar.cgi bar.kit
> cat ~/public_html/cgi/foo.cgi
#!/bin/sh
cd ~/public_html/cgi
exec ./tclkit foo.kit
I have one tclkit runtime that is used my several starkits. So updating all my cgi starkits to the lastest tcl is a breeze. It's also convient to make a "cgikit" that is a tclkit with some additional common libs added to it that all (or most) of my cgi starkits use.
regards
-- bryan
> -----Original Message-----
> From: starkit-bounces at equi4.com [mailto:starkit-bounces at equi4.com]On
> Behalf Of David Welton
> Sent: Wednesday, June 22, 2005 8:35 AM
> To: Arjen Markus
> Cc: starkit at equi4.com
> Subject: Re: [Starkit] Re: starpack as cgi
>
>
> > > It's kind of ugly, maybe there are better ways. Perhaps
> looking at
> > > [pwd] + argv0 to see if that is an executable file?
>
> > Hm, in some of my programs I have had very similar problems.
> > That is: I need to know where the executable lives and not in all
> > circumstances (*) argv[0] (C programs) would contain the path.
>
> > So instead of only relying on the information in argv[0], I also
> > scan the path environment variable to see what directories it
> > might live in. Perhaps that could be done here too?
>
> Tcl already tries to scan the path. The problem is if you have a
> file, say, foo.cgi, which is not in the path, that receives the argv0
> 'foo.cgi'. So looking in the PATH isn't going to help in this case -
> we're already sure it's not there.
>
> --
> David N. Welton
> - http://www.dedasys.com/davidw/
>
> Apache, Linux, Tcl Consulting
> - http://www.dedasys.com/
> _____________________________________________
> Starkit mailing list - Starkit at equi4.com
> http://www.equi4.com/mailman/listinfo/starkit
>
More information about the Starkit
mailing list