File src/background.c changed (mode: 100644) (index 3d31f7700..7ba30d8ef) |
... |
... |
launch_external(const char cmd[], BgJobFlags flags, ShellRequester by) |
1151 |
1151 |
HANDLE hin = INVALID_HANDLE_VALUE; |
HANDLE hin = INVALID_HANDLE_VALUE; |
1152 |
1152 |
if(supply_input && !CreatePipe(&startup.hStdInput, &hin, NULL, 16*1024)) |
if(supply_input && !CreatePipe(&startup.hStdInput, &hin, NULL, 16*1024)) |
1153 |
1153 |
{ |
{ |
1154 |
|
CloseHandle(herr); |
|
|
1154 |
|
if(herr != INVALID_HANDLE_VALUE) |
|
1155 |
|
{ |
|
1156 |
|
CloseHandle(herr); |
|
1157 |
|
} |
1155 |
1158 |
CloseHandle(hnul); |
CloseHandle(hnul); |
1156 |
1159 |
return NULL; |
return NULL; |
1157 |
1160 |
} |
} |
|
... |
... |
launch_external(const char cmd[], BgJobFlags flags, ShellRequester by) |
1161 |
1164 |
{ |
{ |
1162 |
1165 |
if(!CreatePipe(&hout, &startup.hStdOutput, NULL, 16*1024)) |
if(!CreatePipe(&hout, &startup.hStdOutput, NULL, 16*1024)) |
1163 |
1166 |
{ |
{ |
1164 |
|
CloseHandle(herr); |
|
|
1167 |
|
if(herr != INVALID_HANDLE_VALUE) |
|
1168 |
|
{ |
|
1169 |
|
CloseHandle(herr); |
|
1170 |
|
} |
1165 |
1171 |
CloseHandle(hin); |
CloseHandle(hin); |
1166 |
1172 |
CloseHandle(hnul); |
CloseHandle(hnul); |
1167 |
1173 |
return NULL; |
return NULL; |
|
... |
... |
launch_external(const char cmd[], BgJobFlags flags, ShellRequester by) |
1194 |
1200 |
if(!started) |
if(!started) |
1195 |
1201 |
{ |
{ |
1196 |
1202 |
free(sh_cmd); |
free(sh_cmd); |
|
1203 |
|
if(herr != INVALID_HANDLE_VALUE) |
|
1204 |
|
{ |
|
1205 |
|
CloseHandle(herr); |
|
1206 |
|
} |
1197 |
1207 |
CloseHandle(hout); |
CloseHandle(hout); |
1198 |
1208 |
CloseHandle(hin); |
CloseHandle(hin); |
1199 |
1209 |
return NULL; |
return NULL; |
|
... |
... |
launch_external(const char cmd[], BgJobFlags flags, ShellRequester by) |
1211 |
1221 |
|
|
1212 |
1222 |
if(job == NULL) |
if(job == NULL) |
1213 |
1223 |
{ |
{ |
1214 |
|
CloseHandle(herr); |
|
|
1224 |
|
if(herr != INVALID_HANDLE_VALUE) |
|
1225 |
|
{ |
|
1226 |
|
CloseHandle(herr); |
|
1227 |
|
} |
1215 |
1228 |
CloseHandle(hin); |
CloseHandle(hin); |
1216 |
1229 |
CloseHandle(hout); |
CloseHandle(hout); |
1217 |
1230 |
CloseHandle(pinfo.hProcess); |
CloseHandle(pinfo.hProcess); |