Re: [REAME] proposed schedule for 1.8.0/1.7.1

On Mon, 29 Nov 2010 21:00:00 +0100, Christopher Roy Bratusek wrote:
>> I haven't reviewed jump-or-exec, but a new option to check process may be
>> nice for firefox. If you hit the HS multiple times before windows
>> appear, it complains.
>> If there's only one user then pgrep -x suffices, but I don't know
>> other cases.
> ... I don't know the ultimate™ solution for this. One thing could be that 
> (system) locks the HS until the process got started, but that's not 
> implemented in rep.

This does:
if [[ -z `pgrep -x commandname -u euid ]] ; then
   # Ok, no other instance is running

There's no function in librep to get the euid, but it's in env-var
$EUID. This may not work outside of linux, but if it's an optional
argument, it never hurts. Wow! (It can be anytime, no reason to
make it in 1.8.)

Teika (Teika kazura)

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]