On Fri, Nov 02, 2007 at 10:49:18PM +0100, Sander van Dijk wrote:
On Nov 2, 2007 10:02 PM, Anselm R. Garbe [EMAIL PROTECTED] wrote:
Hmm, if that's the reason I tend to write a read()-based getline
function which does not block ;)
Try doing this:
for i in `seq 1 10`
do
echo -n bla
It doesn't work at all...
2007/11/2, Anselm R. Garbe [EMAIL PROTECTED]:
Ritesh,
I pushed a simplified status text processing version which uses
fgets again, for readability and simplicity reasons.
Could you please recheck if hg tip fixes your issue?
Regards,
--
Anselm R. Garbe
The reason was something in my .xinitrc. I changed it and everything is fine.
2007/11/2, Anselm R. Garbe [EMAIL PROTECTED]:
On Fri, Nov 02, 2007 at 05:21:36PM +0100, Enno Gottox Boland wrote:
It doesn't work at all...
Sorry, but I can't reproduce. It works correctly for me so far.
On Nov 2, 2007 6:37 PM, Anselm R. Garbe [EMAIL PROTECTED] wrote:
On Fri, Nov 02, 2007 at 05:21:36PM +0100, Enno Gottox Boland wrote:
It doesn't work at all...
Sorry, but I can't reproduce. It works correctly for me so far.
It seems to me that the call to fgets() blocks, that is, when it's
On Nov 2, 2007 10:02 PM, Anselm R. Garbe [EMAIL PROTECTED] wrote:
Hmm, if that's the reason I tend to write a read()-based getline
function which does not block ;)
Try doing this:
for i in `seq 1 10`
do
echo -n bla
if test $i = 5
then
echo
fi
sleep 3
done | dwm
Hi Ritesh,
On Tue, Oct 30, 2007 at 11:04:33PM -0400, Ritesh Kumar wrote:
I used to run dwm using the following bash script:
while true; do
date;
sleep 1;
done | dwm
... and things used to run fine :).
I changed it to:
while true; do
cat $HOME/.dwm/status_* ;
On Wed, Oct 31, 2007 at 09:28:33AM +0100, Anselm R. Garbe wrote:
I see the problem in the above code, and also believe that your
solution is more correct. What scares me is, that it might seen
as valid input if someone feeds dwm with for example:
echo -n foo
during while... but we can fix
Anselm R. Garbe [EMAIL PROTECTED] writes:
If we decide for line-based input reading, one easily could
block dwm from further event processing through running
echo -n foo | dwm
I think that'd be a big disadvantage.
It could append read text to the end of stext[] whenever it successfully
On 10/31/07, Sander van Dijk [EMAIL PROTECTED] wrote:
On Oct 31, 2007 7:01 AM, Vasil Dimov [EMAIL PROTECTED] wrote:
On Tue, Oct 30, 2007 at 23:04:33 -0400, Ritesh Kumar wrote:
[...]
I went through the source code and fixed the status input handling
code to
make sure it flushes the
On 10/31/07, Anselm R. Garbe [EMAIL PROTECTED] wrote:
Hi Ritesh,
snip
Well let's have a look at the relevant bits in the code:
(a) switch(r = read(STDIN_FILENO, stext, sizeof stext - 1)) {
[...]
default:
(b) for(stext[r] = '\0', p = stext +
On 10/31/07, Ritesh Kumar [EMAIL PROTECTED] wrote:
On 10/31/07, Anselm R. Garbe [EMAIL PROTECTED] wrote:
Hi Ritesh,
snip
Well let's have a look at the relevant bits in the code:
(a) switch(r = read(STDIN_FILENO, stext, sizeof stext - 1)) {
[...]
Hi folks,
I came across this curious behavior for the input status text...
I used to run dwm using the following bash script:
while true; do
date;
sleep 1;
done | dwm
... and things used to run fine :).
I changed it to:
while true; do
cat $HOME/.dwm/status_* ;
date;
sleep
The full patch (against dwm 4.6 + clientspertag) is present at
http://www.cs.unc.edu/~ritesh/dwm/index.html
It should not be difficult to chop out unwanted bits from it :)
_r
On 10/30/07, Ritesh Kumar [EMAIL PROTECTED] wrote:
Hi folks,
I came across this curious behavior for the input status
On Tue, Oct 30, 2007 at 23:04:33 -0400, Ritesh Kumar wrote:
[...]
I went through the source code and fixed the status input handling code to
make sure it flushes the input status text only if in encounters a '\n'.
[...]
if(FD_ISSET(STDIN_FILENO, rd)) {
-
14 matches
Mail list logo