Fossil SCM

For SSH URLs don't explicitly kill SSH with SIGINT, but let close kill process. Observed as a "Killed by signal 2." error on FreeBSD.

andybradford 2014-03-15 21:08 trunk
Commit 0e8f0bc3170d761662988c7004bf11bc66ff376c
1 file changed +1 -2
+1 -2
--- src/popen.c
+++ src/popen.c
@@ -204,19 +204,18 @@
204204
#endif
205205
}
206206
207207
/*
208208
** Close the connection to a child process previously created using
209
-** popen2(). Kill off the child process, then close the pipes.
209
+** popen2().
210210
*/
211211
void pclose2(int fdIn, FILE *pOut, int childPid){
212212
#ifdef _WIN32
213213
/* Not implemented, yet */
214214
close(fdIn);
215215
fclose(pOut);
216216
#else
217217
close(fdIn);
218218
fclose(pOut);
219
- kill(childPid, SIGINT);
220219
while( waitpid(0, 0, WNOHANG)>0 ) {}
221220
#endif
222221
}
223222
--- src/popen.c
+++ src/popen.c
@@ -204,19 +204,18 @@
204 #endif
205 }
206
207 /*
208 ** Close the connection to a child process previously created using
209 ** popen2(). Kill off the child process, then close the pipes.
210 */
211 void pclose2(int fdIn, FILE *pOut, int childPid){
212 #ifdef _WIN32
213 /* Not implemented, yet */
214 close(fdIn);
215 fclose(pOut);
216 #else
217 close(fdIn);
218 fclose(pOut);
219 kill(childPid, SIGINT);
220 while( waitpid(0, 0, WNOHANG)>0 ) {}
221 #endif
222 }
223
--- src/popen.c
+++ src/popen.c
@@ -204,19 +204,18 @@
204 #endif
205 }
206
207 /*
208 ** Close the connection to a child process previously created using
209 ** popen2().
210 */
211 void pclose2(int fdIn, FILE *pOut, int childPid){
212 #ifdef _WIN32
213 /* Not implemented, yet */
214 close(fdIn);
215 fclose(pOut);
216 #else
217 close(fdIn);
218 fclose(pOut);
 
219 while( waitpid(0, 0, WNOHANG)>0 ) {}
220 #endif
221 }
222

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button