This commit is contained in:
Antoine Bartuccio 2017-06-11 02:42:33 +02:00
parent c0e130cb71
commit b7165df43f
1 changed files with 1 additions and 2 deletions

View File

@ -15,12 +15,11 @@
pipe_redirection * getRedirection(){
static pipe_redirection * redirection = NULL;
static char template[] = "/tmp/fishXXXXXX";
if (redirection == NULL){
redirection = (pipe_redirection*) malloc(sizeof(pipe_redirection));
if (redirection == NULL) crash();
redirection->file_name = strdup((char*) template);
redirection->file_name = strdup((char*) "/tmp/fishXXXXXX");
redirection->tmp_file = mkstemp(redirection->file_name);
redirection->to_use = 0;
redirection->read = 0;