Noitidart / Profilist

ff-addon: Profile manager for Australis
https://addons.mozilla.org/en-US/firefox/addon/profilist/?src=github
34 stars 1 forks source link

*nix and mac - pid pollution of lock file #25

Closed Noitidart closed 8 years ago

Noitidart commented 9 years ago

If launch firefox.exe using nsIProcess in linux or mac. (tested on ubuntu 14.04 and mac os x 10.9) the pid of the opener is X. the pid of the opened is Y. if do lsof | grep "parent" you will see that Y is also on lock file of X. im pretty sure the lock is still only coming from X or Y but for some reason it has access. this may be problematic for the mac os x using popen to focus most recent window technique where i target by windows pid.

im sure this doesnt happen on windows because when i was working on enumerating handles and getting the pid's they did not overlap. however its worth another check while keeping the nix/mac thing in mind.

Noitidart commented 9 years ago

Use gio launch for nix: https://gist.github.com/Noitidart/dbe54fcd7794c8ddff6f

Use command line open for mac: https://gist.github.com/Noitidart/730edc0d3517483b5100

Noitidart commented 9 years ago

On Linux the old way to launch wasn't causing issues, but caused an outcry on SO topic: http://stackoverflow.com/questions/28803443/linux-equivalent-of-os-xs-usr-bin-open

I suspect on on mac the old way of opening, was causing issues when focusing the window by PID: http://apple.stackexchange.com/questions/151186/focus-most-recent-window-of-pid-without-requiring-accessibility-approval/151422#comment197546_151422

Noitidart commented 8 years ago

Landed somewhere in v3.0a - https://github.com/Noitidart/Profilist/tree/v3.0a

Latest dev build available on AMO, not yet reached production channel - https://addons.mozilla.org/en-US/firefox/addon/profilist/versions/beta