This is the mail archive of the cygwin-apps 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: Cygwin Subprocesses on XEmacs

Hi Vin,

On Jan 28 22:32, Vin Shelton wrote:
> Dear Corinna, et al -
> On Wed, Jan 28, 2015 at 8:58 AM, Corinna Vinschen wrote:
> > On Jan 28 08:20, Vin Shelton wrote:
> >> On Wed, Jan 28, 2015 at 4:53 AM, Corinna Vinschen wrote:
> >> > On Jan 27 23:05, Vin Shelton wrote:
> >> >> I spent some time debugging M-x shell in XEmacs on 32-bit Cygwin.
> >> >> Here's what I found out.
> >> >>
> >> >> In the child after fork() but before exec(), the setsid() call in
> >> >> disconnect_controlling_terminal() is causing the subprocess not to
> >> >> function after it gets spawned.
> >> >
> >> > Can you define "not function" a bit more detailed?  Does no process work
> >> > at all, or do only processes requiring a tty not work?  For instance,
> >> > does something like an "echo foo > bar" still work?
> >> [...]
> >> >> Thanks for any insight you can offer.
> >> >
> >> > Hmm, not off the top of my head.  Is there a chance that you could
> >> > provide a simple, self contained testcase to reproduce the setsid
> >> > behaviour?  I think I have to debug that.
> >>
> >> You mean a simpler test case than XEmacs?  That seems like a low bar.  :-)
> >
> > LOL.
> After thinking about this for awhile, it dawned on me that the problem
> is not with setsid() per se, but rather with the sequence of events
> _following_ the setsid() call.  That is, setsid() causes some of the
> ensuing ioctl() (or similar) calls that set up the pty to fail.
> I think I have verified this behavior - I restored the old sysdep.c
> module and moved the disconnect_controlling_terminal() call [which
> calls setsid()] from right after the fork() to just before the exec()
> call and M-x shell works on Cygwin as it always has on linux.

Good news!  So the XEmacs code is in a state now that Volker can
start creating a Cygwin package?

> I will endeavor to create a STC for Cygwin that includes all the code
> involved in setting up the terminal so we can experiment with moving
> the setsid() call between the beginning and the end of the function.

Ok, thanks.  Hopefully we can find the snag in Cygwin.


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Attachment: pgphwnFg8beOK.pgp
Description: PGP signature

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