May 26, 2010 0
An Interesting pid File Race
ISC’s dhcpd uses this code to check for an already-running daemon: /* Read previous pid file. */ if ((i = open (path_dhcpd_pid, O_RDONLY)) >= 0) { status = read (i, pbuf, (sizeof pbuf) – 1); close (i); if (status > 0) { pbuf [status] = 0; pid = atoi (pbuf); /* If the previous server [...]
Read the rest of this entry »
From The Peanut Gallery