Re: cwm quit()

Owain Ainsworth <[email protected]> Fri, 4 Apr 2008 01:05:50 +0100
Newsgroups gmane.os.openbsd.x11
Message-ID <[email protected]>
On Thu, Apr 03, 2008 at 08:59:27PM -0300, Gleydson Soares wrote:
> On Thu, Apr 3, 2008 at 8:44 PM, Gleydson Soares <[email protected]> wrote:
> >
> > On Thu, Apr 3, 2008 at 7:22 PM, Owain Ainsworth <[email protected]> wrote:
> >  > On Thu, Apr 03, 2008 at 02:57:29PM -0300, Gleydson Soares wrote:
> >  >  > hi,
> >  >  >
> >  >  > i made a simple function to quit/cwm,
> >  >  >
> >  >  > there two diffs to the same thing,
> >  >  >
> >  >  > yesterday, i discussed with jasper@ and simon@ about that, and further comments
> >  >
> >  >  Honestly, what's the difference to:
> >  >
> >  >  pkill cwm
> >  >
> >  >  ? Cheers,
> >  >
> >  >  -0-
> >  >  --
> >  >  Think of it!  With VLSI we can pack 100 ENIACs in 1 sq. cm.!
> >  >
> >
> >  perhaps, pkill is a problem when working with Xnest environment
> >
> 
> Owain, Try it following:
> 
> $ sudo  Xnest -ac :1
> $ export DISPLAY=:1
> $ cwm -d :1
> $ pgrep cwm
> 30226
> 12980
> $
> 
> if you try "pkill cwm" on cwm -d :1, the cwm on :0 will Terminate,
> that is bad if you are running a "make build" for example  ;-)

Point taken. 

As to the code:

the second diff (adding a flag to the locking function) is really pretty
ugly. other wise they share no code.

The first one looks alright on a first glance, I dislike the choice of
keybinding though, too easy to hit by accident.

why SIGKILL? why not SIGTERM? kill -9 is always bad manners :)
> 
> cheers,
> gsoares

Ta,
-0-
-- 
There are three ways to get something done: do it yourself, hire
someone, or forbid your kids to do it.