Bug 16741 - /usr/bin/netscape leaves behind a defunct process
Summary: /usr/bin/netscape leaves behind a defunct process
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: netscape   
(Show other bugs)
Version: 6.2
Hardware: i386
OS: Linux
medium
low
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-08-22 19:32 UTC by josip
Modified: 2014-03-17 02:16 UTC (History)
1 user (show)

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


Attachments (Terms of Use)

Description josip 2000-08-22 19:32:26 UTC
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 15:44:27 UTC
I see this all the time!

Comment 2 Bill Nottingham 2001-01-19 22:19:52 UTC
changed as of netscape-4.76-5.


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