Bug 16741 - /usr/bin/netscape leaves behind a defunct process
/usr/bin/netscape leaves behind a defunct process
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: netscape (Show other bugs)
6.2
i386 Linux
medium Severity low
: ---
: ---
Assigned To: Bill Nottingham
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-08-22 15:32 EDT by josip
Modified: 2014-03-16 22:16 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-01-07 10:44:30 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description josip 2000-08-22 15:32:26 EDT
Here is what happens:

$ netscape &
[1] 11959
$ ps
  PID TTY          TIME CMD
11953 pts/0    00:00:00 bash
11959 pts/0    00:00:01 netscape-commun
11974 pts/0    00:00:00 netscape <defunct>
11975 pts/0    00:00:00 netscape-commun
11977 pts/0    00:00:00 ps

The cause is a missing 'sleep 1' between backgrounding a command and 'exec'
in the /usr/bin/netscape script.  The function newbrowser() in
/usr/bin/netscape should insert some delay between '... &' and 'exec ...'
and I suggest the following:

                if [ "$url" = "" ]; then
                        [ ${rerun:=0} -eq 1 ] && { sleep 3; $netscape
$defsrem "xfeDoCommand($b_opt)" '$@' 2>/dev/null ; } &
                            sleep 1
                            exec $netscape $defs $cl_opt "$@"
                else
                            exec $netscape $defs "$@"
                fi      

With 'sleep 1' inserted as shown above, there are no defunct processes left
behind:

$ netscape &
[1] 30277
$ ps
  PID TTY          TIME CMD
15341 pts/1    00:00:00 bash
30277 pts/1    00:00:01 netscape-commun
30345 pts/1    00:00:00 netscape-commun
31128 pts/1    00:00:00 ps

I hope this helps...
Josip
Comment 1 Bryce Nesbitt 2001-01-07 10:44:27 EST
I see this all the time!
Comment 2 Bill Nottingham 2001-01-19 17:19:52 EST
changed as of netscape-4.76-5.

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