|
|
@ -458,16 +458,12 @@ read_input_from_editor(void) |
|
|
|
int fd; |
|
|
|
FILE *f; |
|
|
|
|
|
|
|
if ( asprintf(&filename, "%s/fmailXXXXXX", get_tmp_dir()) == -1 ) |
|
|
|
if ( asprintf(&filename, "%s/fmailXXXXXX", get_tmp_dir()) == -1 |
|
|
|
|| (fd = mkstemp(filename)) == -1 ) |
|
|
|
err(EXIT_FAILURE, "cannot create temporary file"); |
|
|
|
|
|
|
|
if ( (fd = mkstemp(filename)) == -1 ) |
|
|
|
err(EXIT_FAILURE, "cannot create temporary file"); |
|
|
|
|
|
|
|
if ( asprintf(&command, "%s %s", get_editor(), filename) == -1 ) |
|
|
|
err(EXIT_FAILURE, "cannot execute editor"); |
|
|
|
|
|
|
|
if ( system(command) == -1 ) |
|
|
|
if ( asprintf(&command, "%s %s", get_editor(), filename) == -1 |
|
|
|
|| system(command) == -1 ) |
|
|
|
err(EXIT_FAILURE, "cannot execute editor"); |
|
|
|
|
|
|
|
if ( (f = fdopen(fd, "r")) == NULL ) |
|
|
|