add: if (fifo_check(fifofd, pipe_name)<0) goto error;
context: FILE *open_reply_pipe( char *pipe_name ){	int fifofd;	FILE *file_handle;	int flags;	int retries=FIFO_REPLY_RETRIES;	if (!pipe_name || *pipe_name==0) {		DBG("DEBUG: open_reply_pipe: no file to write to about missing cmd\n");		return 0;	}tryagain:	/* open non-blocking to make sure that a broken client will not 	 * block the FIFO server forever */	fifofd=open( pipe_name, O_WRONLY | O_NONBLOCK );	if (fifofd==-1) {		/* retry several times if client is not yet ready for getting		   feedback via a reply pipe		*/		if (errno==ENXIO) {			/* give up on the client - we can't afford server blocking */			if (retries==0) {				LOG(L_ERR, "ERROR: open_reply_pipe: no client at %s\n",					pipe_name );				return 0;			}			/* don't be noisy on the very first try */			if (retries!=FIFO_REPLY_RETRIES)				DBG("DEBUG: open_reply_pipe: retry countdown: %d\n", retries );			sleep_us( FIFO_REPLY_WAIT );			retries--;			goto tryagain;		}		/* some other opening error */		LOG(L_ERR, "ERROR: open_reply_pipe: open error (%s): %s\n",			pipe_name, strerror(errno));		return 0;	}	/* we want server blocking for big writes */	if ( (flags=fcntl(fifofd, F_GETFL, 0))<0) {		LOG(L_ERR, "ERROR: open_reply_pipe (%s): getfl failed: %s\n",			pipe_name, strerror(errno));		goto error;	}	flags&=~O_NONBLOCK;	if (fcntl(fifofd, F_SETFL, flags)<0) {		LOG(L_ERR, "ERROR: open_reply_pipe (%s): setfl cntl failed: %s\n",			pipe_name, strerror(errno));		goto error;	}	/* create an I/O stream */		file_handle=fdopen( fifofd, "w");	if (file_handle==NULL) {		LOG(L_ERR, "ERROR: open_reply_pipe: open error (%s): %s\n",			pipe_name, strerror(errno));		goto error;	}	return file_handle;error:	close(fifofd);	return 0;}