Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1005 - ifup-ppp: not disconnecting stdin/out/err
Summary: ifup-ppp: not disconnecting stdin/out/err
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: initscripts
Version: 5.2
Hardware: i386
OS: Linux
low
low
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-01-31 17:15 UTC by kenn
Modified: 2014-03-17 02:08 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 1999-02-03 17:20:49 UTC


Attachments (Terms of Use)

Description kenn 1999-01-31 17:15:11 UTC
The first is a bug in
/etc/sysconfig/network-scripts/ifup-ppp:

--- ifup-ppp.dist       Thu Oct 15 17:07:52 1998
+++ ifup-ppp    Sun Jan 31 20:31:04 1999
@@ -6,7 +6,7 @@
 if [ "$1" != daemon ] ; then
   # disconnect stdin, out, err to disassociate from
controlling tty
   # so that no HUPs will get through.
-  $0 daemon $*& </dev/null >/dev/null 2>/dev/null
+  $0 daemon $* </dev/null >/dev/null 2>/dev/null &
   exit 0
 fi
 shift

The redirections don't seem to take effect unless they come
before the &.  I discovered this when writing a CGI script
containing
the command /usr/sbin/usernetctl ppp0 up.  Because ifup-ppp
never
disconnected from stdout, Apache never saw stdout closed and
didn't
properly close the HTTP connection.

Doing

   /usr/sbin/usernetctl ppp0 up &> /dev/null < /dev/null

to forcibly redirect stdin/out/err works around the
problem.  Making the
above change to ifup-ppp fixes the root cause.  (Thanks to
James Griffiths <my@clubi.ie> for helping to track this one
down.)

This probably applies to all architectures, but I don't
have access to any others to test on.

Comment 1 Bill Nottingham 1999-02-03 17:20:59 UTC
fixed in initscripts-3.84


Note You need to log in before you can comment on or make changes to this bug.