Closed Bug 1558095 Opened 5 years ago Closed 5 years ago

Updater calls waitpid that does not make sense

Categories

(Toolkit :: Application Update, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla69
Tracking Status
firefox69 --- fixed

People

(Reporter: emk, Assigned: emk)

References

()

Details

Attachments

(1 file)

This waitpid will always fail because waitpid can only wait for children.

Wow... that's from the original implementation... nice catch!
https://dxr.mozilla.org/mozilla1.8/source/toolkit/mozapps/update/src/updater/updater.cpp#1171

Priority: -- → P3

Some random thoughts on the way forward:

  1. Just remove the unworking waitpid. On Windows, we have to wait for exiting updater because the operating system will lock running executable files. It does not apply to other platforms.
  2. Replace waitpid with polling getppid.
  3. Pass a pipe fd instead of a pid and reading the pipe until EOF.
  4. Replace waitpid with something specific to platforms (e.g. PR_SET_PDEATHSIG on Linux).

I think 1 is sufficient since it has been this way forever unless there is some issue someone can think of that this would fix on Linux and Mac.

Pushed by VYV03354@nifty.ne.jp:
https://hg.mozilla.org/integration/autoland/rev/e74c6c4c5d62
Remove useless waitpid from updater. r=rstrong
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69
Assignee: nobody → VYV03354
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: