Closed Bug 74067 Opened 23 years ago Closed 23 years ago

run-mozilla.sh -d is broken

Categories

(SeaMonkey :: Build Config, enhancement, P5)

x86
Linux
enhancement

Tracking

(Not tracked)

VERIFIED FIXED
Future

People

(Reporter: db, Assigned: cls)

Details

The script run-mozilla.sh in the nightly build is broken. I was going to start
it in the debugger bug wrote -d instead of -g. And then the script got into a loop.

> run-mozilla.sh
shift: shift count must be <= $#
shift: shift count must be <= $#
shift: shift count must be <= $#
...
...
It should of course say

> run-mozilla.sh -d
what nightly is this?
Any linux version i've tried. For example the latest nightly build 2001033121
buildconfig i guess...
Component: Browser-General → Build Config
moving really this time
Assignee: asa → cls
QA Contact: doronr → granrose
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → INVALID
-d expects an argument.  Hence the shift.  Not sure why this is considered a
bug.
Well, if you don't give the argument it loops forever. It's marked as a minor
bug just because it's not really important and it do work if you give the argument.
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
reopening, setting to future.  this is a valid bug, just not important.

A simple fix would be to check $# before doing the shift a la:

if [$# -ge 2]; then
shift 2
else
echo "-d requires an argument"
exit 1
fi

or something like that.
Severity: minor → enhancement
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P5
Target Milestone: --- → Future
Is it really minor to have a bunch of these zombie processes running on a
machine.  I seem to collect them somehow, and can only kill them with -9.  Or is
that a different issue?
@@ -290,7 +290,12 @@
       ;;
     -d | --debugger)
       moz_debugger=$2;
-      shift 2
+      if [ "${moz_debugger}" != "" ]; then
+       shift 2
+      else
+        echo "-d requires an argument"
+        exit 1
+      fi
       ;;
     *)
       break;
Patch checked in.
Status: NEW → RESOLVED
Closed: 23 years ago23 years ago
Resolution: --- → FIXED
Verified working as intended

on Solaris 8 Sparc latest cvs pull as of 11/15/01
Verified working as intended

on Solaris 8 Sparc latest cvs pull as of 11/15/01
Status: RESOLVED → VERIFIED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.