On Thu, 04 Jun 2015 15:16:24 +0200, Mustafa Hussain said: > I mean how can we use the pid in the scenario of finding the process that > is not used. What, *exactly*, do you mean by "not used"? And what do you plan to do with a process that's running but "not used"? (Hint - think about *why* it's running if it's not in use...) The fact that a user has not direct interacted with a process doesn't mean they are not in fact using it. Banshee and pulseaudio can be streaming music even though I haven't touched the banshee gui in hours, and I can't interact directly with pulsaudio at all because it presents no user interface. Similarly, your X server is probably "in use", and a lot of other background processes doing things for the user. And if your code does something to my pidgin process because it's doing background housekeeping even though I'm not "using" it, I'm going to be quite upset if it results in me not getting an IM from my boss that a meeting has been rescheduled... Now, things like Chrome can deactivate tabs, but only because it has additional information only available in userspace: That the process is associated with a tab, that a tab has certain semantics when not visible, and that the tab is or isn't visible to the user. And you *still* have to provide a user control because some tabs can't be suspended because they have Javascript attached that have to do housekeeping functions like sending keepalive packets to a webserver to maintain a connection even if you're not looking at the tab. _______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies