fix_linkpidfile

make sure that the linkpidfile is always created

Subject: Bug#284382: ppp: linkpidfile is not created upon detachment
From: <herbert@gondor.apana.org.au>

Package: ppp
Version: 2.4.2+20040428-2
Severity: wishlist

When pppd detaches from the parent normally, that is, without nodetach
or updetach set, the linkpidfile is not created even when linkname is
set.

This is because the create_linkpidfile call in detach() is only made
if the linkpidfile is filled in.  However, linkpidfile is never filled
in until create_linkpidfile has been called.

IMHO the call should be made uncondtionally in detach() since
create_linkpidfile does its own check on linkname anyway.

Please note that the version of pppd in woody always wrote the
linkpidfile after detaching.  It did so in main() however.  That
call has now been removed which is why I'm seeing this problem.

[...]

--

Gbp-Pq: Name fix_linkpidfile
This commit is contained in:
Ubuntu Developers 2022-05-14 02:43:52 +08:00 committed by openKylinBot
parent 7b27beb1f6
commit 8e9c8720e8
1 changed files with 1 additions and 2 deletions

View File

@ -765,7 +765,6 @@ detach()
/* update pid files if they have been written already */ /* update pid files if they have been written already */
if (pidfilename[0]) if (pidfilename[0])
create_pidfile(pid); create_pidfile(pid);
if (linkpidfile[0])
create_linkpidfile(pid); create_linkpidfile(pid);
exit(0); /* parent dies */ exit(0); /* parent dies */
} }