Closed Bug 273961 Opened 20 years ago Closed 20 years ago

nsIProcess.run() causes double execution of the target process

Categories

(Core :: XPCOM, defect)

x86
Windows XP
defect
Not set
major

Tracking

()

RESOLVED FIXED

People

(Reporter: ma1, Assigned: timeless)

References

()

Details

(Keywords: regression)

Attachments

(4 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a6) Gecko/20041208 Firefox/1.0+
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a6) Gecko/20041208 Firefox/1.0+

Using nsIProcess.run() to launch an external executable causes this file to run
twice serially.

Reproducible: Always
Steps to Reproduce:
1. On a Windows system execute the following script (adjusting notepad.exe path
if necessary):

const notepad=Components.classes["@mozilla.org/file/local;1"
  ].createInstance(Components.interfaces.nsILocalFile);
notepad.initWithPath("c:\\windows\\notepad.exe")
const process=Components.classes['@mozilla.org/process/util;1'
  ].createInstance(Components.interfaces.nsIProcess);
process.init(notepad);
process.run(true,[],0,{});

2. Wait until Notepad window opens
3. close Notepad window

Actual Results:  
A new Notepad window opened just after I closed the first.

Expected Results:  
nsIProcess should have launched only one instance of Notepad.
regression window:
built on Nov  8 2004 at 05:31:49 - worked
built on Nov 16 2004 at 06:48:30 - failed
Assignee: bugs → dougt
Component: OS Integration → XPCOM
Keywords: regression
Product: Firefox → Core
QA Contact: firefox.os-integration
Version: unspecified → Trunk
built on Nov 10 2004 at 05:17:25 - worked

there are no other builds available from archive.mozilla.org
Assignee: dougt → timeless
Depends on: 267269
Attached patch Fix.Splinter Review
Don't include unix process code in the windows build.
Comment on attachment 168369 [details] [diff] [review]
Fix.

r+sr=darin
Attachment #168369 - Flags: superreview+
Attachment #168369 - Flags: review+
Fixed.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
For the record, my fix is identical to timeless' second fix, didn't realize that
before attaching my own version and landing it. My appologies.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: