Fossil SCM
Close pipes before killing off the child process.
Commit
360b0477592874d1dfcdf7516ade9ccfa564d843
Parent
0a51263a23b658a…
1 file changed
+1
-1
+1
-1
| --- src/popen.c | ||
| +++ src/popen.c | ||
| @@ -174,10 +174,10 @@ | ||
| 174 | 174 | */ |
| 175 | 175 | void pclose2(int fdIn, FILE *pOut, int childPid){ |
| 176 | 176 | #ifdef __MINGW32__ |
| 177 | 177 | /* Not implemented, yet */ |
| 178 | 178 | #else |
| 179 | - kill(childPid, SIGINT); | |
| 180 | 179 | close(fdIn); |
| 181 | 180 | fclose(pOut); |
| 181 | + kill(childPid, SIGINT); | |
| 182 | 182 | #endif |
| 183 | 183 | } |
| 184 | 184 |
| --- src/popen.c | |
| +++ src/popen.c | |
| @@ -174,10 +174,10 @@ | |
| 174 | */ |
| 175 | void pclose2(int fdIn, FILE *pOut, int childPid){ |
| 176 | #ifdef __MINGW32__ |
| 177 | /* Not implemented, yet */ |
| 178 | #else |
| 179 | kill(childPid, SIGINT); |
| 180 | close(fdIn); |
| 181 | fclose(pOut); |
| 182 | #endif |
| 183 | } |
| 184 |
| --- src/popen.c | |
| +++ src/popen.c | |
| @@ -174,10 +174,10 @@ | |
| 174 | */ |
| 175 | void pclose2(int fdIn, FILE *pOut, int childPid){ |
| 176 | #ifdef __MINGW32__ |
| 177 | /* Not implemented, yet */ |
| 178 | #else |
| 179 | close(fdIn); |
| 180 | fclose(pOut); |
| 181 | kill(childPid, SIGINT); |
| 182 | #endif |
| 183 | } |
| 184 |