calling clearenv() only if it's avaialble
This commit is contained in:
		@ -1135,7 +1135,7 @@ for (i = 0; i < 5; i++)
 | 
			
		||||
	//mio_bcstrtoskad (mio, "[fe80::c7e2:bd6e:1209:ac1b%eno1]:1153", &servaddr);
 | 
			
		||||
 | 
			
		||||
	//mio_bcstrtoskad (mio, "[::]:9988", &htts_bind_addr);
 | 
			
		||||
	mio_bcstrtoskad (mio, "127.0.0.1:9988", &htts_bind_addr);
 | 
			
		||||
	mio_bcstrtoskad (mio, "0.0.0.0:9988", &htts_bind_addr);
 | 
			
		||||
 | 
			
		||||
	dnc = mio_svc_dnc_start(mio, &servaddr, MIO_NULL, &send_tmout, &reply_tmout, 2); /* option - send to all, send one by one */
 | 
			
		||||
	htts = mio_svc_htts_start(mio, &htts_bind_addr, process_http_request);
 | 
			
		||||
 | 
			
		||||
@ -1277,7 +1277,11 @@ static int cgi_peer_on_fork (mio_dev_pro_t* pro, void* fork_ctx)
 | 
			
		||||
 | 
			
		||||
	path = getenv("PATH");
 | 
			
		||||
	lang = getenv("LANG");
 | 
			
		||||
#if defined(HAVE_CLEARENV)
 | 
			
		||||
	clearenv ();
 | 
			
		||||
#else
 | 
			
		||||
	putenv ("environ=NULL");
 | 
			
		||||
#endif
 | 
			
		||||
	if (path) setenv ("PATH", path, 1);
 | 
			
		||||
	if (lang) setenv ("LANG", lang, 1);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -243,7 +243,7 @@ int mio_sys_waitmux (mio_t* mio, const mio_ntime_t* tmout, mio_sys_mux_evtcb_t e
 | 
			
		||||
 | 
			
		||||
			dev = mux->pd.dptr[i];
 | 
			
		||||
 | 
			
		||||
			MIO_ASSERT (mio, !(mux->pd.pfd[i].revents & POLLNVAL));
 | 
			
		||||
			/*MIO_ASSERT (mio, !(mux->pd.pfd[i].revents & POLLNVAL));*/
 | 
			
		||||
			if (mux->pd.pfd[i].revents & POLLIN) events |= MIO_DEV_EVENT_IN;
 | 
			
		||||
			if (mux->pd.pfd[i].revents & POLLOUT) events |= MIO_DEV_EVENT_OUT;
 | 
			
		||||
			if (mux->pd.pfd[i].revents & POLLPRI) events |= MIO_DEV_EVENT_PRI;
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user