Closed Bug 1003672 Opened 10 years ago Closed 10 years ago

push-to-device.js cannot kill app with long names

Categories

(Firefox OS Graveyard :: Gaia::Build, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
2.0 S1 (9may)

People

(Reporter: timdream, Assigned: timdream)

References

Details

(Whiteboard: [p=1])

Attachments

(1 file)

+++ This bug was initially created as a clone of Bug #915484 +++

It looks like apps like "Built-in Keyboard" is shown as "Built-in Keyboa" in b2g-info. Instead of matching the whole app name, we should just match "Built-in Keyboa".
s/b2g-info/b2g-ps/
Comment on attachment 8415013 [details] [review]
mozilla-b2g:master PR#18813

Dave, would you might give some input here first?

I am not sure the right way to fix this bug is to make the APPLICATION column longer or simply truncate the string in build script tools here.

https://github.com/mozilla-b2g/gonk-misc/blame/master/b2g-ps
Attachment #8415013 - Flags: feedback?(dhylands)
Status: NEW → ASSIGNED
Yeah - the process name is truncated to 16 characters (including the terminating null) by the kernel. If you look inside the internal kernel data structures you'll see:
http://lxr.linux.no/#linux+v3.14.2/include/linux/sched.h#L265
http://lxr.linux.no/#linux+v3.14.2/include/linux/sched.h#L1320

So if you're going to compare, you need to truncate the string you're going to compare to be no more than 15 characters.

So you can't really make it any bigger.
Comment on attachment 8415013 [details] [review]
mozilla-b2g:master PR#18813

That looks about right to me.
Attachment #8415013 - Flags: feedback?(dhylands) → feedback+
Attachment #8415013 - Flags: review?(yurenju.mozilla)
(In reply to Dave Hylands [:dhylands] from comment #4)
> Yeah - the process name is truncated to 16 characters (including the
> terminating null) by the kernel. If you look inside the internal kernel data
> structures you'll see:
> http://lxr.linux.no/#linux+v3.14.2/include/linux/sched.h#L265
> http://lxr.linux.no/#linux+v3.14.2/include/linux/sched.h#L1320
> 
> So if you're going to compare, you need to truncate the string you're going
> to compare to be no more than 15 characters.
> 
> So you can't really make it any bigger.

Thanks for the explanation!
Attachment #8415013 - Flags: review?(yurenju.mozilla) → review+
master: https://github.com/mozilla-b2g/gaia/commit/0d705e63223f07a9fd4859cf85af267dc6de18c7
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.0 S1 (9may)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: