Implement CalculateProcessCreationTimestamp() on OpenBSD

RESOLVED FIXED in mozilla6

Status

()

defect
RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: gaston, Assigned: gaston)

Tracking

Trunk
mozilla6
All
OpenBSD
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 1 obsolete attachment)

(Assignee)

Description

8 years ago
User-Agent:       Mozilla/5.0 (X11; OpenBSD amd64; rv:2.0b11) Gecko/20100101 Firefox/4.0b11
Build Identifier: 

Followup of https://bugzilla.mozilla.org/show_bug.cgi?id=522375, the attached patch implement the needed function for OpenBSD.
Tested with Mike Hommey's startup.xpi extension, works fine for me.

Reproducible: Always
(Assignee)

Comment 1

8 years ago
Added myself to contributors, feel free to remove if the addition is not worth it.
(Assignee)

Updated

8 years ago
Attachment #511379 - Flags: review?(tglek)
(Assignee)

Updated

8 years ago
Version: unspecified → Trunk

Comment 2

8 years ago
Comment on attachment 511379 [details] [diff] [review]
Implement CalculateProcessCreationTimestamp() on OpenBSD

I'm pretty sure that instead of copying code like this one can just adapt the OSX code and have a unified approach for all of the BSDs
Attachment #511379 - Flags: review?(tglek) → review-
(Assignee)

Comment 3

8 years ago
Well. I'm only responsible for OpenBSD, but i can tell you that :
- osx has proc->kp_proc.p_un.__p_starttime.tv_sec (what a nice name!), openbsd & netbsd have proc->p_ustart_sec as int32_t, freebsd has proc->ki_start which is a struct timeval.
- openbsd and netbsd have struct kinfo_proc2, freebsd has struct kinfo_proc
- the mib names for the sysctl code are probably the same for netbsd and openbsd, i doubt it for freebsd

so i don't think we'll get a more readable code with a 'unified approach for all of the bsd' with a function filled with #ifdefs.. maybe common things for openbsd/netbsd and macos/freebsd, but i'm not the one who can judge that.

cc'ing netbsd and freebsd mozilla maintainers for comments.
(Assignee)

Updated

8 years ago
Status: UNCONFIRMED → NEW
Ever confirmed: true
(Assignee)

Updated

8 years ago
Blocks: openbsdmeta
Net and freebsd guys, any comments ? 

Taras how should we proceed to move forward ?
(Assignee)

Comment 5

8 years ago
OpenBSD switched back from kinfo_proc2 to kinfo_proc recently, so adapt..

This patch reuses the XP_MACOSX codepath as requested by taras, i don't find it particularly readable compared to the previous version..
Is that patch ready for review ?
(Assignee)

Comment 7

8 years ago
I'm testbuilding both now, but i'd rather use that one with a separate #if block. 
Obsoletes previous att 511379 since this one uses kinfo_proc instead of kinfo_proc2.
Attachment #511379 - Attachment is obsolete: true
Attachment #526670 - Flags: review?

Comment 8

8 years ago
Comment on attachment 526670 [details] [diff] [review]
Implement CalculateProcessCreationTimestamp() on OpenBSD

hey, sorry for not responding earlier(I wasn't CCed on the bug). Thanks for verifying that a unified approach is worse.
Attachment #526670 - Flags: review? → review+

Updated

8 years ago
Keywords: checkin-needed
Pushed in cedar:
http://hg.mozilla.org/projects/cedar/rev/c5fcc4d54945

Landry, to make pushers life easier, could you follow these rules when attaching a patch:
http://blog.bonardo.net/2010/06/22/so-youre-about-to-use-checkin-needed
Thanks :)
Assignee: nobody → landry
Keywords: checkin-needed
Hardware: Other → All
Whiteboard: [fixed in cedar]
Status: NEW → ASSIGNED
Pushed in m-c:
http://hg.mozilla.org/mozilla-central/rev/c5fcc4d54945
Status: ASSIGNED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
Whiteboard: [fixed in cedar]
Target Milestone: --- → mozilla6
You need to log in before you can comment on or make changes to this bug.