From owner-cvs-all@FreeBSD.ORG Thu Aug 10 11:11:50 2006 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6986016A4DE; Thu, 10 Aug 2006 11:11:50 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C323443D6A; Thu, 10 Aug 2006 11:11:49 +0000 (GMT) (envelope-from glebius@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k7ABBnHm098201; Thu, 10 Aug 2006 11:11:49 GMT (envelope-from glebius@repoman.freebsd.org) Received: (from glebius@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7ABBnNs098200; Thu, 10 Aug 2006 11:11:49 GMT (envelope-from glebius) Message-Id: <200608101111.k7ABBnNs098200@repoman.freebsd.org> From: Gleb Smirnoff Date: Thu, 10 Aug 2006 11:11:49 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: RELENG_6 Cc: Subject: cvs commit: src/usr.sbin/ngctl Makefile main.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Aug 2006 11:11:50 -0000 glebius 2006-08-10 11:11:49 UTC FreeBSD src repository Modified files: (Branch: RELENG_6) usr.sbin/ngctl Makefile main.c Log: MFC: Add line edit and history support to ngctl(8) via editline(3). Details: - The main thread runs editline(3) functions, that can block. - A separate thread is launched to monitor netgraph sockets. - The access to the descriptors is protected by a mutex. At runtime the monitoring thread owns the mutex. When the main thread reads a command from el_gets() it asks the monitoring thread to release a mutex and sleep until the main thread processes the command. This makes ngctl(8) depend on libedit, and libpthread. Thus, the new functionality isn't compiled in if release is being built with -DRELEASE_CRUNCH. PR: bin/87352 Reviewed by: ru, Nuno Antunes Revision Changes Path 1.14.8.1 +11 -0 src/usr.sbin/ngctl/Makefile 1.18.2.2 +158 -22 src/usr.sbin/ngctl/main.c