summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ypserv/yp_extern.h
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>1999-04-29 20:24:00 +0000
committerwpaul <wpaul@FreeBSD.org>1999-04-29 20:24:00 +0000
commitbcdf933fad0276458853d00c92945926de3b1381 (patch)
tree129833c0be36d80e1276a9a68011ffd8e7af8173 /usr.sbin/ypserv/yp_extern.h
parent7634f5f76b08db127fd33f5f3285d870f9d640a0 (diff)
downloadFreeBSD-src-bcdf933fad0276458853d00c92945926de3b1381.zip
FreeBSD-src-bcdf933fad0276458853d00c92945926de3b1381.tar.gz
Add some extra checks to make sure that a child ypserv process doesn't
try to fork() a child of its own, which could result in several children ypservs running at once. I'm still not sure exactly what leads to this condition, but these fixes should stop it from causing trouble. A new function, yp_fork() checks to see if the current process is already a child of the parent ypserv, and returns failure (and logs an error message) rather than spawning another child.
Diffstat (limited to 'usr.sbin/ypserv/yp_extern.h')
-rw-r--r--usr.sbin/ypserv/yp_extern.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/ypserv/yp_extern.h b/usr.sbin/ypserv/yp_extern.h
index 0aaee26..4786cca 100644
--- a/usr.sbin/ypserv/yp_extern.h
+++ b/usr.sbin/ypserv/yp_extern.h
@@ -29,7 +29,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: yp_extern.h,v 1.11 1997/02/22 16:15:11 peter Exp $
+ * $Id: yp_extern.h,v 1.12 1997/10/29 07:25:03 charnier Exp $
*/
#include <db.h>
@@ -68,6 +68,8 @@ extern int children;
extern int resfd;
extern char *progname;
extern char *yp_dir;
+extern pid_t yp_pid;
+
extern enum ypstat yp_errno;
extern void yp_error __P((const char *, ...));
#ifdef DB_CACHE
OpenPOWER on IntegriCloud