mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-25 18:40:11 +01:00
updated extract.c
This commit is contained in:
parent
f0963cdfbd
commit
30f5aafc32
@ -286,6 +286,10 @@ void extract_attachment_content(struct session_data *sdata, struct _state *state
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* http://stackoverflow.com/questions/7292642/grabbing-output-from-exec
|
||||||
|
*/
|
||||||
|
|
||||||
if(pipe(link) == -1){
|
if(pipe(link) == -1){
|
||||||
syslog(LOG_PRIORITY, "%s: cannot open link", sdata->ttmpfile);
|
syslog(LOG_PRIORITY, "%s: cannot open link", sdata->ttmpfile);
|
||||||
return;
|
return;
|
||||||
@ -293,6 +297,8 @@ void extract_attachment_content(struct session_data *sdata, struct _state *state
|
|||||||
|
|
||||||
if((pid = fork()) == -1){
|
if((pid = fork()) == -1){
|
||||||
syslog(LOG_PRIORITY, "%s: cannot fork", sdata->ttmpfile);
|
syslog(LOG_PRIORITY, "%s: cannot fork", sdata->ttmpfile);
|
||||||
|
close(link[0]);
|
||||||
|
close(link[1]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user