summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1998-06-06 20:50:57 +0000
committerbrian <brian@FreeBSD.org>1998-06-06 20:50:57 +0000
commit88b436b903942028007c3ce448108486c4da5547 (patch)
tree368d6bf6283d17e8c9c001f3bd584334c4a9a70a /usr.sbin
parent30cc111a0f023e7efe54d7c4ec29f9673fbc4901 (diff)
downloadFreeBSD-src-88b436b903942028007c3ce448108486c4da5547.zip
FreeBSD-src-88b436b903942028007c3ce448108486c4da5547.tar.gz
Put the correct pid in /var/run/tunX.pid
Suggested by: many
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ppp/bundle.c4
-rw-r--r--usr.sbin/ppp/bundle.h3
-rw-r--r--usr.sbin/ppp/main.c4
3 files changed, 7 insertions, 4 deletions
diff --git a/usr.sbin/ppp/bundle.c b/usr.sbin/ppp/bundle.c
index dfe29b0..ae7a6c1 100644
--- a/usr.sbin/ppp/bundle.c
+++ b/usr.sbin/ppp/bundle.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: bundle.c,v 1.11 1998/05/29 18:32:09 brian Exp $
+ * $Id: bundle.c,v 1.12 1998/05/29 18:33:08 brian Exp $
*/
#include <sys/param.h>
@@ -653,7 +653,7 @@ bundle_DescriptorWrite(struct descriptor *d, struct bundle *bundle,
descriptor_Write(&dl->desc, bundle, fdset);
}
-static void
+void
bundle_LockTun(struct bundle *bundle)
{
FILE *lockfile;
diff --git a/usr.sbin/ppp/bundle.h b/usr.sbin/ppp/bundle.h
index ab11f0ed..d91237b 100644
--- a/usr.sbin/ppp/bundle.h
+++ b/usr.sbin/ppp/bundle.h
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: bundle.h,v 1.4 1998/05/28 23:17:33 brian Exp $
+ * $Id: bundle.h,v 1.5 1998/05/29 18:33:08 brian Exp $
*/
#define PHASE_DEAD 0 /* Link is dead */
@@ -166,3 +166,4 @@ extern int bundle_SetMode(struct bundle *, struct datalink *, int);
extern int bundle_RenameDatalink(struct bundle *, struct datalink *,
const char *);
extern void bundle_setsid(struct bundle *, int);
+extern void bundle_LockTun(struct bundle *);
diff --git a/usr.sbin/ppp/main.c b/usr.sbin/ppp/main.c
index 0b812c3..0a978f3 100644
--- a/usr.sbin/ppp/main.c
+++ b/usr.sbin/ppp/main.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: main.c,v 1.128 1998/05/29 18:32:11 brian Exp $
+ * $Id: main.c,v 1.129 1998/05/29 18:33:09 brian Exp $
*
* TODO:
*/
@@ -408,6 +408,8 @@ main(int argc, char **argv)
bundle->notify.fd = bgpipe[1];
}
+ bundle_LockTun(bundle); /* we have a new pid */
+
/* -auto, -dedicated, -ddial & -background */
prompt_Destroy(prompt, 0);
close(STDOUT_FILENO);
OpenPOWER on IntegriCloud