0
0
mirror of https://github.com/rkd77/elinks.git synced 2025-06-30 22:19:29 -04:00

Revert "Avoid races."

This reverts commit 40d3102bc7e45d713d81ab96c8c75e52fdfb9c73.
This commit is contained in:
Witold Filipczyk 2007-09-02 16:56:55 +02:00 committed by Witold Filipczyk
parent 1b36682244
commit 0c406b48a1

View File

@ -683,7 +683,6 @@ get_mime_handler_mailcap(unsigned char *type, struct terminal *term)
#if defined(HAVE_SYS_IPC_H) && defined(HAVE_SYS_SEM_H) && defined(HAVE_SYS_SHM_H)
if (!shared_mem)
return NULL;
shared_mem[0] = '\0'; /* For unexpected death of slave. */
len = strlen(type) + 1;
data = fmem_alloc(2 + len);
if (!data)
@ -694,6 +693,7 @@ get_mime_handler_mailcap(unsigned char *type, struct terminal *term)
hard_write(term->fdout, data, len + 2);
fmem_free(data);
shared_mem[0] = '\0'; /* For unexpected death of slave. */
sem_wait(master_sem);
if (!*shared_mem)
return NULL;