valarnin / ffxiv-tools

Tools for FFXIV
MIT License
77 stars 21 forks source link

only grep for the first matching pid, in case there are multiple #20

Closed x4dr closed 2 years ago

x4dr commented 2 years ago

on my machine, i launched the launcher via lutris, so there were multiple entries. the script breaks if there is are two results, so i constrained it to just the first (greo -m 1)

in the case of normal operation, noone should be able to tell the difference in case of two ps entries, either should be fine

ideally there would be a dialogue to select from multiple results, but it is probably an edgecase anyway :)

valarnin commented 2 years ago

This actually happens fairly often. It's due to XIVLauncher's auto updater spawning a second process or something, I'm still not clear on exactly what. The correct behavior, rather than only using the first entry, would be to warn the user and try again. In all cases, waiting a few seconds on the XIVLauncher login screen before running the scripts is sufficient to avoid the issue.

Arcitec commented 2 years ago

Fixed by #22. :)