prowong / lrcdis

Automatically exported from code.google.com/p/lrcdis
1 stars 0 forks source link

播放器进程检查错误 #12

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
代码是使用pgrep 
-f检查播放器进程的,这会导致误判,如有一个正在运行的程
序:
 vi exaile
pgrep -f exaile就会返回真

建议不用pgrep 
-f来实现,但我不太清楚这些播放软件的可执行程序的名字,
希望能
改一下。

Original issue reported on code.google.com by cxcxcxcx@gmail.com on 16 Mar 2009 at 12:03

GoogleCodeExporter commented 9 years ago
同意。
经过测试,exaile, audacious, mpd, mocp 均可以用pgrep -x 来检查到。
quodlibet的命令行则是python "`which quodlibet`"
amarok和mplayer请xiooli来测试一下
rhythmbox请bones来测试一下吧,毕竟只有你才有GNOME,装起来应�
��最省事吧……

Original comment by oldh...@gmail.com on 16 Mar 2009 at 1:16

GoogleCodeExporter commented 9 years ago
rhythmbox 也可以用 pgrep -x

Original comment by bones7...@gmail.com on 16 Mar 2009 at 1:23

GoogleCodeExporter commented 9 years ago
amarok和mplayer也可以用pgrep -x
ps: 我vim xxx,然后运行pgrep -x xxx只有一个输出,而pgrep -f 
xxx多了个,说明pgrep -x是
可以的。

Original comment by xioooli@gmail.com on 16 Mar 2009 at 2:08

GoogleCodeExporter commented 9 years ago
现在的模式是用pgrep -x 
辅以用户属性判定,这样应该比较合理和有针对性了.

Original comment by bones7...@gmail.com on 19 Jul 2009 at 9:47