X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/8a8e54f3f61721b40c60712c4c5c0cefd049502e..3d3dd282cf262a8e9819a245b64779fe1a724252:/IkiWiki/Wrapper.pm diff --git a/IkiWiki/Wrapper.pm b/IkiWiki/Wrapper.pm index 06be36dfc..b46bc6aa9 100644 --- a/IkiWiki/Wrapper.pm +++ b/IkiWiki/Wrapper.pm @@ -28,10 +28,11 @@ sub gen_wrappers () { %config=(%origconfig); } +our $program_to_wrap = $0; sub gen_wrapper () { $config{srcdir}=File::Spec->rel2abs($config{srcdir}); $config{destdir}=File::Spec->rel2abs($config{destdir}); - my $this=File::Spec->rel2abs($0); + my $this=File::Spec->rel2abs($program_to_wrap); if (! -x $this) { error(sprintf(gettext("%s doesn't seem to be executable"), $this)); } @@ -181,7 +182,7 @@ void addenv(char *var, char *val) { newenviron[i++]=s; } -set_cgilock_fd (int lockfd) { +void set_cgilock_fd (int lockfd) { char *fd_s=malloc(8); sprintf(fd_s, "%i", lockfd); setenv("IKIWIKI_CGILOCK_FD", fd_s, 1);