This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Call for testing Cygwin snapshot


On 12/12/2005 2:32 AM, Corinna Vinschen wrote:
> On Dec  8 16:08, David Rothenberger wrote:
>> ----------------------------------------------------------------------
>> Problem 2:
>> ----------------------------------------------------------------------
>> This is also with XEmacs. I normally start XEmacs with the following
>> command from a CMD.EXE shell:
>>
>> c:\cygwin\bin\bash -lc 'setsid xemacs &'
>>
>> If you try that with 'setsid xemacs -q &' and then type
>>
>>   Alt-X "grep" "grep -ni system /etc/passwd"
>>
>> there is no result. Furthermore, typing in XEmacs yields red
>> squares. XEmacs is essentially useless and must be restarted.
>>
>> I see this behavior with the 20051130 snapshot. It works with the
>> 20051118 snapshot but pops a console window when running grep. It
>> works correctly with the 20051110 snapshot.
> 
> You're obviously expecting that we know xemacs.  

No, I wasn't. I was hoping that my instructions would be as easy to
duplicate as the "env" problem above.

> But I can't reproduce this grep problem since I'm unable to start the
> above grep.  The grep submenu is entirely greyed out when I look into
> it.  

I didn't mention the grep submenu. Here's a set of more detailed
instructions.

Here they are again:
1. From a CMD.EXE shell, type
   c:\cygwin\bin\bash -lc 'setsid xemacs -q'
2. In XEmacs, press ALT-x (hold ALT key, press x key, release x key,
   release ALT key)
3. XEmacs will prompt for a command. The prompt will already have 
   "grep -n ". Just add (without quotes) "-i system /etc/passwd" and 
   then press Enter.

The output of the grep command should appear in XEmacs. It
doesn't. If you type anything, you will see red squares. If you
minimize the window and then restore it, you will see that it's
completely messed up. There's no title bar, not Windows icons for
closing, minimizing, etc., no content in the window.

Press CTRL-x CTRL-c to kill XEmacs.

> And furthermore I have no idea what a red square means in xemacs.

They don't mean anything special. When you type, you should see the
characters you're typing. The red squares just indicate something is
very messed up.

> Isn't it possible to have easier testcases than (x)emacs of all things?

I'm sorry, I don't know of an easier test case. If this email isn't
any more helpful, I'll try to extract code from the XEmacs sources
to duplicate the problem, but I think that will take me a very long
time.

I do find that everything is okay without the setsid. I captured an
strace of this sequence with and without using setsid. I've attached
a text file with what I guess are the relevant areas. At least, this
was the only area that had any difference.

The case where setsid was used includes

[main] xemacs init_cygheap::manage_console_count: fhandler_tty_slave::open: console_count 1, amount 1, no ctty, avoid_freeing_console 0
[main] xemacs fhandler_tty_slave::open: CreateWindowStation 0x64C, Win32 error 0
[main] xemacs fhandler_tty_slave::open: SetProcessWindowStation 1, Win32 error 0
[main] xemacs fhandler_tty_slave::open: 1 = AllocConsole (), Win32 error 0
[main] xemacs fhandler_tty_slave::open: /dev/tty1 opened, usecount 1

and later

[main] xemacs init_cygheap::manage_console_count: fhandler_tty_slave::close: console_count 0, amount -1, no ctty, avoid_freeing_console 0
[main] xemacs init_cygheap::manage_console_count: freed console

When setsid is not used, a new Window Station is not created and the
subsequent fhandler_tty_slave::close does not free the console.

This isn't really a major issue for me anymore since I've discovered
I can start XEmacs using the run command get the same effect as
setsid. The grep command works fine when I start it this way:

c:\cygwin\bin\run c:\cygwin\bin\bash -lc 'xemacs'

-- 
David Rothenberger                spammer? -> spam@daveroth.dyndns.org
GPG/PGP: 0x92D68FD8, DB7C 5146 1AB0 483A 9D27 DFBA FBB9 E328 92D6 8FD8

Attachment: xemacs-strace.txt
Description: Text document

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]