X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=win32%2Fperlhost.h;h=cac05b28324fe2b54860a2ef6449101746a3d98a;hb=d722968f91639a851375cb3aeb7df128909c0779;hp=a3f4c28350c10ceb9190cc738ec5c45b14646422;hpb=ba869debd80c55cfae8e9d4de0991d62f9efcb9b;p=p5sagit%2Fp5-mst-13.2.git diff --git a/win32/perlhost.h b/win32/perlhost.h index a3f4c28..cac05b2 100644 --- a/win32/perlhost.h +++ b/win32/perlhost.h @@ -17,8 +17,9 @@ #if !defined(PERL_OBJECT) START_EXTERN_C #endif -extern char * g_win32_get_privlib(char *pl); -extern char * g_win32_get_sitelib(char *pl); +extern char * g_win32_get_privlib(const char *pl); +extern char * g_win32_get_sitelib(const char *pl); +extern char * g_win32_get_vendorlib(const char *pl); extern char * g_getlogin(void); extern int do_spawn2(char *cmd, int exectype); #if !defined(PERL_OBJECT) @@ -475,17 +476,23 @@ PerlEnvOsId(struct IPerlEnv* piPerl) } char* -PerlEnvLibPath(struct IPerlEnv* piPerl, char *pl) +PerlEnvLibPath(struct IPerlEnv* piPerl, const char *pl) { return g_win32_get_privlib(pl); } char* -PerlEnvSiteLibPath(struct IPerlEnv* piPerl, char *pl) +PerlEnvSiteLibPath(struct IPerlEnv* piPerl, const char *pl) { return g_win32_get_sitelib(pl); } +char* +PerlEnvVendorLibPath(struct IPerlEnv* piPerl, const char *pl) +{ + return g_win32_get_vendorlib(pl); +} + void PerlEnvGetChildIO(struct IPerlEnv* piPerl, child_IO_table* ptr) { @@ -506,6 +513,7 @@ struct IPerlEnv perlEnv = PerlEnvOsId, PerlEnvLibPath, PerlEnvSiteLibPath, + PerlEnvVendorLibPath, PerlEnvGetChildIO, }; @@ -1711,6 +1719,13 @@ restart: PL_main_root = Nullop; } + /* close the std handles to avoid fd leaks */ + { + do_close(gv_fetchpv("STDIN", TRUE, SVt_PVIO), FALSE); + do_close(gv_fetchpv("STDOUT", TRUE, SVt_PVIO), FALSE); + do_close(gv_fetchpv("STDERR", TRUE, SVt_PVIO), FALSE); + } + /* destroy everything (waits for any pseudo-forked children) */ perl_destruct(my_perl); perl_free(my_perl);