X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/ef0c569a956f97ee02df16c1a3e8f3cb2993a62a..7c8344b008c19eac9891bcb2b47d03df1beec1a5:/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);