diff -r 0121592e2512 -r 2947214c450e pre-inst/pre-inst.c --- a/pre-inst/pre-inst.c Thu Jul 16 19:54:45 2020 +0100 +++ b/pre-inst/pre-inst.c Tue Apr 25 17:41:00 2023 +0100 @@ -48,12 +48,13 @@ #endif /* WIN32 */ #include "post.h" -#ifdef WIN32 -/* Under WIN32, g_spawn requires a helper program which we'd rather avoid */ -#undef USE_G_SPAWN -#else +/* + * Under WIN32, g_spawn may require a helper program which we'd rather avoid. + * At least with glib 2.58, this isn't needed if g_spawn_sync() is used (or + * G_SPAWN_DO_NOT_REAP_CHILD is specified), so we can now define USE_G_SPAWN + * unconditionally. + */ #define USE_G_SPAWN -#endif LUALIB_API int luaopen_posix(lua_State *L); @@ -376,6 +377,7 @@ "Post command exited with code %ld",(long)rc); return FALSE; } + fprintf(stderr,"post command exited normally\n"); return TRUE; } @@ -422,6 +424,29 @@ return TRUE; } +print_arguments(int argc,char **argv) +{ + int i,j; + for(i=0;iargc>0) + { + printf("Running post command: "); + print_arguments(post->argc,post->argv); + putchar('\n'); pre_install_spawn_sync(post->argv,&error); + } else if (argv) run_post(argc,argv,success,repository,&error); if (post)