[patch]: hostapd PID file

Kel Modderman kelrin at tpg.com.au
Mon Jul 10 06:14:13 EDT 2006


Paweł Foremski wrote:
> By the way, here's the same functionality for 0.4.9.
>
>   
> @@ -815,6 +820,14 @@
>  		goto out;
>  	}
>  
> +	if (pid_file) {
> +		FILE *f = fopen(pid_file, "w");
> +		if (f) {
> +			fprintf(f, "%u\n", getpid());
> +			fclose(f);
> +		}
> +	}
> +
>  	openlog("hostapd", 0, LOG_DAEMON);
>  
>   

why not use the os_daemonize() function to take care of pidfile creation 
and destruction?

Thanks, Kel.



More information about the HostAP mailing list