integrate cfgperl contents into mainline
[p5sagit/p5-mst-13.2.git] / vmesa / vmesa.c
index 0e9baf3..0e7894a 100644 (file)
@@ -116,6 +116,7 @@ do_aspawn(SV* really, SV **mark, SV **sp)
         fdMap[3];
  SV     *sv,
         **p_sv;
+ STRLEN        n_a;
 
     status = FAIL;
     if (sp > mark)
@@ -126,7 +127,7 @@ do_aspawn(SV* really, SV **mark, SV **sp)
        while (++mark <= sp)
        {
            if (*mark)
-              *a++ = SvPVx(*mark, na);
+              *a++ = SvPVx(*mark, n_a);
            else
               *a++ = "";
        }
@@ -142,7 +143,7 @@ do_aspawn(SV* really, SV **mark, SV **sp)
        /*-----------------------------------------------------*/
        if (*PL_Argv[0] != '/')
            TAINT_ENV();
-       if (really && *(tmps = SvPV(really, na)))
+       if (really && *(tmps = SvPV(really, n_a)))
            pid = spawnp(tmps, nFd, fdMap, &inherit,
                         (const char **) PL_Argv,
                         (const char **) environ);
@@ -407,6 +408,7 @@ my_popen(char *cmd, char *mode)
          Perl_stdin_fd = pFd[that];
       if (strNE(cmd,"-"))
       {
+        PERL_FLUSHALL_FOR_CHILD;
          pid = spawn_cmd(cmd, Perl_stdin_fd, Perl_stdout_fd);
          if (pid >= 0)
          {
@@ -477,33 +479,6 @@ my_pclose(FILE *fp)
 
 }
 
-/*===================== End of my_pclose ===================*/
-
-/************************************************************/
-/*                                                          */
-/* Name      - getTHR.                                      */
-/*                                                          */
-/* Function  - Use pclose to terminate a piped command      */
-/*             file stream.                                 */
-/*                                                          */
-/* On Exit   - Thread specific data returned.               */
-/*                                                          */
-/************************************************************/
-
-struct perl_thread *
-getTHR()
-{
- int status;
- struct perl_thread *pThread;
-
-   status = pthread_getspecific(PL_thr_key, (void **) &pThread);
-   if (status != 0)
-      pThread = NULL;
-   return (pThread);
-}
-
-/*===================== End of getTHR ======================*/
-
 /************************************************************/
 /*                                                          */
 /* Name      - dlopen.                                      */