Bug 16741

Summary: /usr/bin/netscape leaves behind a defunct process
Product: [Retired] Red Hat Linux Reporter: josip
Component: netscapeAssignee: Bill Nottingham <notting>
Status: CLOSED RAWHIDE QA Contact:
Severity: low Docs Contact:
Priority: medium    
Version: 6.2CC: rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
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: --- Target Upstream Version:
Embargoed:

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.