* Re: [Emacs-diffs] /srv/bzr/emacs/trunk r101633: Add fd handling with callbacks to select, dbus needs it for async operation.
[not found] <E1Ozur1-0004Ag-MZ@eggs.gnu.org>
@ 2010-09-26 18:28 ` Eli Zaretskii
2010-09-26 19:07 ` Jan Djärv
0 siblings, 1 reply; 17+ messages in thread
From: Eli Zaretskii @ 2010-09-26 18:28 UTC (permalink / raw)
To: Jan Djärv; +Cc: emacs-devel
> Date: Sun, 26 Sep 2010 13:17:33 -0400
> From: emacs-diffs-request@gnu.org
>
> @@ -7023,12 +7086,10 @@
> void
> add_keyboard_wait_descriptor (int desc)
> {
> -#ifdef subprocesses
> FD_SET (desc, &input_wait_mask);
> FD_SET (desc, &non_process_wait_mask);
> - if (desc > max_keyboard_desc)
> - max_keyboard_desc = desc;
> -#endif
> + if (desc > max_input_desc)
> + max_input_desc = desc;
> }
>
> /* From now on, do not expect DESC to give keyboard input. */
> @@ -7036,20 +7097,16 @@
> void
> delete_keyboard_wait_descriptor (int desc)
> {
> -#ifdef subprocesses
> int fd;
> - int lim = max_keyboard_desc;
> + int lim = max_input_desc;
>
> FD_CLR (desc, &input_wait_mask);
> FD_CLR (desc, &non_process_wait_mask);
>
> - if (desc == max_keyboard_desc)
> + if (desc == max_input_desc)
> for (fd = 0; fd < lim; fd++)
> - if (FD_ISSET (fd, &input_wait_mask)
> - && !FD_ISSET (fd, &non_keyboard_wait_mask)
> - && !FD_ISSET (fd, &gpm_wait_mask))
> - max_keyboard_desc = fd;
> -#endif /* subprocesses */
The changes that remove the "#ifdef subprocesses" conditionals will
probably break the MSDOS build, because input_wait_mask etc. are only
defined "#ifdef subprocesses". The functions
add_keyboard_wait_descriptor and delete_keyboard_wait_descriptor are
supposed to be no-ops for the MSDOS build.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Emacs-diffs] /srv/bzr/emacs/trunk r101633: Add fd handling with callbacks to select, dbus needs it for async operation.
2010-09-26 18:28 ` Eli Zaretskii
@ 2010-09-26 19:07 ` Jan Djärv
2010-09-26 19:17 ` Eli Zaretskii
0 siblings, 1 reply; 17+ messages in thread
From: Jan Djärv @ 2010-09-26 19:07 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
Eli Zaretskii skrev 2010-09-26 20.28:
>
> The changes that remove the "#ifdef subprocesses" conditionals will
> probably break the MSDOS build, because input_wait_mask etc. are only
> defined "#ifdef subprocesses". The functions
> add_keyboard_wait_descriptor and delete_keyboard_wait_descriptor are
> supposed to be no-ops for the MSDOS build.
We need another ifdef then as dbus and for example session file descriptors
have nothing to do with subprocesses. #ifndef MSDOS perhaps?
Jan D.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Emacs-diffs] /srv/bzr/emacs/trunk r101633: Add fd handling with callbacks to select, dbus needs it for async operation.
2010-09-26 19:07 ` Jan Djärv
@ 2010-09-26 19:17 ` Eli Zaretskii
2010-09-26 20:23 ` Jan Djärv
0 siblings, 1 reply; 17+ messages in thread
From: Eli Zaretskii @ 2010-09-26 19:17 UTC (permalink / raw)
To: Jan Djärv; +Cc: emacs-devel
> Date: Sun, 26 Sep 2010 21:07:32 +0200
> From: Jan Djärv <jan.h.d@swipnet.se>
> CC: emacs-devel@gnu.org
>
> > The changes that remove the "#ifdef subprocesses" conditionals will
> > probably break the MSDOS build, because input_wait_mask etc. are only
> > defined "#ifdef subprocesses". The functions
> > add_keyboard_wait_descriptor and delete_keyboard_wait_descriptor are
> > supposed to be no-ops for the MSDOS build.
>
> We need another ifdef then as dbus and for example session file descriptors
> have nothing to do with subprocesses. #ifndef MSDOS perhaps?
The only Emacs build that doesn't have `subprocesses' #define'd is the
MSDOS build. Using "#ifdef subprocesses" is just slightly less ugly
then OS-dependent #define, but otherwise it is functionally identical
to "#ifndef MSDOS".
So I don't think we need another ifdef.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Emacs-diffs] /srv/bzr/emacs/trunk r101633: Add fd handling with callbacks to select, dbus needs it for async operation.
[not found] <E1Ozuqt-0004W5-KB@internal.in.savannah.gnu.org>
@ 2010-09-26 19:49 ` Juanma Barranquero
2010-09-26 20:50 ` Jan Djärv
0 siblings, 1 reply; 17+ messages in thread
From: Juanma Barranquero @ 2010-09-26 19:49 UTC (permalink / raw)
To: Jan D; +Cc: emacs-devel
On Sun, Sep 26, 2010 at 18:20, Jan D <jan.h.d@swipnet.se> wrote:
> ------------------------------------------------------------
> revno: 101633
> committer: Jan D <jan.h.d@swipnet.se>
> branch nick: trunk
> timestamp: Sun 2010-09-26 18:20:01 +0200
> message:
> Add fd handling with callbacks to select, dbus needs it for async operation.
This change breaks Windows.
After "emacs -Q", Emacs repeteadly shows the error message "select
error: Invalid argument". Functionality that uses the minibuffer does
not work (for example, C-x C-b), and you cannot exit with C-x C-c.
Juanma
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Emacs-diffs] /srv/bzr/emacs/trunk r101633: Add fd handling with callbacks to select, dbus needs it for async operation.
2010-09-26 19:17 ` Eli Zaretskii
@ 2010-09-26 20:23 ` Jan Djärv
2010-09-26 22:00 ` Eli Zaretskii
0 siblings, 1 reply; 17+ messages in thread
From: Jan Djärv @ 2010-09-26 20:23 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
Eli Zaretskii skrev 2010-09-26 21.17:
>> Date: Sun, 26 Sep 2010 21:07:32 +0200
>> From: Jan Djärv<jan.h.d@swipnet.se>
>> CC: emacs-devel@gnu.org
>>
>>> The changes that remove the "#ifdef subprocesses" conditionals will
>>> probably break the MSDOS build, because input_wait_mask etc. are only
>>> defined "#ifdef subprocesses". The functions
>>> add_keyboard_wait_descriptor and delete_keyboard_wait_descriptor are
>>> supposed to be no-ops for the MSDOS build.
>>
>> We need another ifdef then as dbus and for example session file descriptors
>> have nothing to do with subprocesses. #ifndef MSDOS perhaps?
>
> The only Emacs build that doesn't have `subprocesses' #define'd is the
> MSDOS build. Using "#ifdef subprocesses" is just slightly less ugly
> then OS-dependent #define, but otherwise it is functionally identical
> to "#ifndef MSDOS".
>
> So I don't think we need another ifdef.
Ok, I put it back.
Jan D.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Emacs-diffs] /srv/bzr/emacs/trunk r101633: Add fd handling with callbacks to select, dbus needs it for async operation.
2010-09-26 19:49 ` [Emacs-diffs] /srv/bzr/emacs/trunk r101633: Add fd handling with callbacks to select, dbus needs it for async operation Juanma Barranquero
@ 2010-09-26 20:50 ` Jan Djärv
2010-09-26 21:05 ` Juanma Barranquero
2010-09-26 21:59 ` Eli Zaretskii
0 siblings, 2 replies; 17+ messages in thread
From: Jan Djärv @ 2010-09-26 20:50 UTC (permalink / raw)
To: Juanma Barranquero; +Cc: emacs-devel
Juanma Barranquero skrev 2010-09-26 21.49:
> On Sun, Sep 26, 2010 at 18:20, Jan D<jan.h.d@swipnet.se> wrote:
>> ------------------------------------------------------------
>> revno: 101633
>> committer: Jan D<jan.h.d@swipnet.se>
>> branch nick: trunk
>> timestamp: Sun 2010-09-26 18:20:01 +0200
>> message:
>> Add fd handling with callbacks to select, dbus needs it for async operation.
>
> This change breaks Windows.
Alright! Oh, you mean it breaks Emacs on Windows...
>
> After "emacs -Q", Emacs repeteadly shows the error message "select
> error: Invalid argument". Functionality that uses the minibuffer does
> not work (for example, C-x C-b), and you cannot exit with C-x C-c.
>
I see that s/ms-w32.h defines BROKEN_NON_BLOCKING_CONNECT, but that it
actually means "our select emulation is broken".
I added some code, please try it (I can't). I wish define:s would say what
they are about.
Jan D.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Emacs-diffs] /srv/bzr/emacs/trunk r101633: Add fd handling with callbacks to select, dbus needs it for async operation.
2010-09-26 20:50 ` Jan Djärv
@ 2010-09-26 21:05 ` Juanma Barranquero
2010-09-26 21:59 ` Eli Zaretskii
1 sibling, 0 replies; 17+ messages in thread
From: Juanma Barranquero @ 2010-09-26 21:05 UTC (permalink / raw)
To: Jan Djärv; +Cc: emacs-devel
On Sun, Sep 26, 2010 at 22:50, Jan Djärv <jan.h.d@swipnet.se> wrote:
> Alright! Oh, you mean it breaks Emacs on Windows...
Yes... :-D
> I added some code, please try it (I can't). I wish define:s would say what
> they are about.
It works, thanks.
Juanma
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Emacs-diffs] /srv/bzr/emacs/trunk r101633: Add fd handling with callbacks to select, dbus needs it for async operation.
2010-09-26 20:50 ` Jan Djärv
2010-09-26 21:05 ` Juanma Barranquero
@ 2010-09-26 21:59 ` Eli Zaretskii
2010-09-27 6:30 ` Jan Djärv
1 sibling, 1 reply; 17+ messages in thread
From: Eli Zaretskii @ 2010-09-26 21:59 UTC (permalink / raw)
To: Jan Djärv; +Cc: lekktu, emacs-devel
> Date: Sun, 26 Sep 2010 22:50:38 +0200
> From: Jan Djärv <jan.h.d@swipnet.se>
> Cc: emacs-devel@gnu.org
>
> I wish define:s would say what they are about.
It's never too late to start documenting them (or change their names
to something self-explanatory, for that matter, if it's possible).
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Emacs-diffs] /srv/bzr/emacs/trunk r101633: Add fd handling with callbacks to select, dbus needs it for async operation.
2010-09-26 20:23 ` Jan Djärv
@ 2010-09-26 22:00 ` Eli Zaretskii
0 siblings, 0 replies; 17+ messages in thread
From: Eli Zaretskii @ 2010-09-26 22:00 UTC (permalink / raw)
To: Jan Djärv; +Cc: emacs-devel
> Date: Sun, 26 Sep 2010 22:23:16 +0200
> From: Jan Djärv <jan.h.d@swipnet.se>
> CC: emacs-devel@gnu.org
>
> > The only Emacs build that doesn't have `subprocesses' #define'd is the
> > MSDOS build. Using "#ifdef subprocesses" is just slightly less ugly
> > then OS-dependent #define, but otherwise it is functionally identical
> > to "#ifndef MSDOS".
> >
> > So I don't think we need another ifdef.
>
> Ok, I put it back.
Thanks.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Emacs-diffs] /srv/bzr/emacs/trunk r101633: Add fd handling with callbacks to select, dbus needs it for async operation.
2010-09-26 21:59 ` Eli Zaretskii
@ 2010-09-27 6:30 ` Jan Djärv
2010-09-27 7:43 ` Eli Zaretskii
` (2 more replies)
0 siblings, 3 replies; 17+ messages in thread
From: Jan Djärv @ 2010-09-27 6:30 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
2010-09-26 23:59, Eli Zaretskii skrev:
>> Date: Sun, 26 Sep 2010 22:50:38 +0200
>> From: Jan Djärv<jan.h.d@swipnet.se>
>> Cc: emacs-devel@gnu.org
>>
>> I wish define:s would say what they are about.
>
> It's never too late to start documenting them (or change their names
> to something self-explanatory, for that matter, if it's possible).
>
This case may be simple, but what does subprocesses (for exampe) mean? It
doesn't mean just "have subprocess", it also means "we can do select" and "we
can listen to many inputs at once", and so on.
Jan D.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Emacs-diffs] /srv/bzr/emacs/trunk r101633: Add fd handling with callbacks to select, dbus needs it for async operation.
2010-09-27 6:30 ` Jan Djärv
@ 2010-09-27 7:43 ` Eli Zaretskii
2010-09-27 8:23 ` Jan Djärv
2010-09-27 10:33 ` Dan Nicolaescu
2010-09-27 20:43 ` Stefan Monnier
2 siblings, 1 reply; 17+ messages in thread
From: Eli Zaretskii @ 2010-09-27 7:43 UTC (permalink / raw)
To: Jan Djärv; +Cc: emacs-devel
> Date: Mon, 27 Sep 2010 08:30:11 +0200
> From: Jan Djärv <jan.h.d@swipnet.se>
> CC: emacs-devel@gnu.org
>
> This case may be simple, but what does subprocesses (for exampe) mean? It
> doesn't mean just "have subprocess", it also means "we can do select" and "we
> can listen to many inputs at once", and so on.
It means the build supports async subprocesses. Once upon a time,
several platforms where Emacs could be built did not have this
capability, but nowadays only the DOS build remains without it.
Quite a few of the macros are documented in src/config.in and in
src/m/*.h and src/s/*.h header files. This one is in config.in.
Btw, `select' is not the problem here, because even the DOS build has
it. The issue is whether you have `pipe' and `fork'/`exec' (or some
equivalents thereof), and whether `select' can handle network file
descriptors.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Emacs-diffs] /srv/bzr/emacs/trunk r101633: Add fd handling with callbacks to select, dbus needs it for async operation.
2010-09-27 7:43 ` Eli Zaretskii
@ 2010-09-27 8:23 ` Jan Djärv
2010-09-27 8:40 ` Eli Zaretskii
0 siblings, 1 reply; 17+ messages in thread
From: Jan Djärv @ 2010-09-27 8:23 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
2010-09-27 09:43, Eli Zaretskii skrev:
>
> Btw, `select' is not the problem here, because even the DOS build has
> it. The issue is whether you have `pipe' and `fork'/`exec' (or some
> equivalents thereof), and whether `select' can handle network file
> descriptors.
So why are there an #ifdef subprocesses in
add/delete_keyboard_wait_descriptor? The only thing they do is manipulate
data that goes to select. It seems that these ifdefs really belong somewhere
else.
Jan D.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Emacs-diffs] /srv/bzr/emacs/trunk r101633: Add fd handling with callbacks to select, dbus needs it for async operation.
2010-09-27 8:23 ` Jan Djärv
@ 2010-09-27 8:40 ` Eli Zaretskii
2010-09-27 9:09 ` Jan Djärv
0 siblings, 1 reply; 17+ messages in thread
From: Eli Zaretskii @ 2010-09-27 8:40 UTC (permalink / raw)
To: Jan Djärv; +Cc: emacs-devel
> Date: Mon, 27 Sep 2010 10:23:10 +0200
> From: =?UTF-8?B?SmFuIERqw6Rydg==?= <jan.h.d@swipnet.se>
> CC: emacs-devel@gnu.org
>
> So why are there an #ifdef subprocesses in
> add/delete_keyboard_wait_descriptor? The only thing they do is
> manipulate data that goes to select.
Because the variables they use are only defined under
"#ifdef subprocesses", see the beginning of process.c. The
alternative was to have more #ifdef's at the beginning of process.c or
reshuffle the beginning some more, and I didn't feel at the time it
was justified, given the possible breakage of various platforms I
could never test on. There's too much unportable stuff in process.c,
so I prefer not to mess with that unless strictly necessary.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Emacs-diffs] /srv/bzr/emacs/trunk r101633: Add fd handling with callbacks to select, dbus needs it for async operation.
2010-09-27 8:40 ` Eli Zaretskii
@ 2010-09-27 9:09 ` Jan Djärv
0 siblings, 0 replies; 17+ messages in thread
From: Jan Djärv @ 2010-09-27 9:09 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
2010-09-27 10:40, Eli Zaretskii skrev:
> There's too much unportable stuff in process.c,
> so I prefer not to mess with that unless strictly necessary.
True indeed.
Jan D.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Emacs-diffs] /srv/bzr/emacs/trunk r101633: Add fd handling with callbacks to select, dbus needs it for async operation.
2010-09-27 6:30 ` Jan Djärv
2010-09-27 7:43 ` Eli Zaretskii
@ 2010-09-27 10:33 ` Dan Nicolaescu
2010-09-27 11:53 ` Jan Djärv
2010-09-27 20:43 ` Stefan Monnier
2 siblings, 1 reply; 17+ messages in thread
From: Dan Nicolaescu @ 2010-09-27 10:33 UTC (permalink / raw)
To: Jan Djärv; +Cc: Eli Zaretskii, emacs-devel
Jan Djärv <jan.h.d@swipnet.se> writes:
> 2010-09-26 23:59, Eli Zaretskii skrev:
>>> Date: Sun, 26 Sep 2010 22:50:38 +0200
>>> From: Jan Djärv<jan.h.d@swipnet.se>
>>> Cc: emacs-devel@gnu.org
>>>
>>> I wish define:s would say what they are about.
>>
>> It's never too late to start documenting them (or change their names
>> to something self-explanatory, for that matter, if it's possible).
>>
>
> This case may be simple, but what does subprocesses (for exampe) mean?
It currently means !MSDOS.
IMO we should just get rid of it and replace it with !MSDOS in order to simplify the code.
The probability that there would be a need to port the current emacs to
an OS that does not have subprocess support is very close to zero (or zero).
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Emacs-diffs] /srv/bzr/emacs/trunk r101633: Add fd handling with callbacks to select, dbus needs it for async operation.
2010-09-27 10:33 ` Dan Nicolaescu
@ 2010-09-27 11:53 ` Jan Djärv
0 siblings, 0 replies; 17+ messages in thread
From: Jan Djärv @ 2010-09-27 11:53 UTC (permalink / raw)
To: Dan Nicolaescu; +Cc: Eli Zaretskii, emacs-devel
2010-09-27 12:33, Dan Nicolaescu skrev:
> Jan Djärv<jan.h.d@swipnet.se> writes:
>
>> 2010-09-26 23:59, Eli Zaretskii skrev:
>>>> Date: Sun, 26 Sep 2010 22:50:38 +0200
>>>> From: Jan Djärv<jan.h.d@swipnet.se>
>>>> Cc: emacs-devel@gnu.org
>>>>
>>>> I wish define:s would say what they are about.
>>>
>>> It's never too late to start documenting them (or change their names
>>> to something self-explanatory, for that matter, if it's possible).
>>>
>>
>> This case may be simple, but what does subprocesses (for exampe) mean?
>
> It currently means !MSDOS.
> IMO we should just get rid of it and replace it with !MSDOS in order to simplify the code.
> The probability that there would be a need to port the current emacs to
> an OS that does not have subprocess support is very close to zero (or zero).
>
How about all these new tablets? It isn't unreasonable to have Emacs there,
but do they actually have subprocesses capability like exec:ing grep or make?
Jan D.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Emacs-diffs] /srv/bzr/emacs/trunk r101633: Add fd handling with callbacks to select, dbus needs it for async operation.
2010-09-27 6:30 ` Jan Djärv
2010-09-27 7:43 ` Eli Zaretskii
2010-09-27 10:33 ` Dan Nicolaescu
@ 2010-09-27 20:43 ` Stefan Monnier
2 siblings, 0 replies; 17+ messages in thread
From: Stefan Monnier @ 2010-09-27 20:43 UTC (permalink / raw)
To: Jan Djärv; +Cc: Eli Zaretskii, emacs-devel
>>> I wish define:s would say what they are about.
There's admin/CPP-DEFINES
Stefan
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2010-09-27 20:43 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <E1Ozuqt-0004W5-KB@internal.in.savannah.gnu.org>
2010-09-26 19:49 ` [Emacs-diffs] /srv/bzr/emacs/trunk r101633: Add fd handling with callbacks to select, dbus needs it for async operation Juanma Barranquero
2010-09-26 20:50 ` Jan Djärv
2010-09-26 21:05 ` Juanma Barranquero
2010-09-26 21:59 ` Eli Zaretskii
2010-09-27 6:30 ` Jan Djärv
2010-09-27 7:43 ` Eli Zaretskii
2010-09-27 8:23 ` Jan Djärv
2010-09-27 8:40 ` Eli Zaretskii
2010-09-27 9:09 ` Jan Djärv
2010-09-27 10:33 ` Dan Nicolaescu
2010-09-27 11:53 ` Jan Djärv
2010-09-27 20:43 ` Stefan Monnier
[not found] <E1Ozur1-0004Ag-MZ@eggs.gnu.org>
2010-09-26 18:28 ` Eli Zaretskii
2010-09-26 19:07 ` Jan Djärv
2010-09-26 19:17 ` Eli Zaretskii
2010-09-26 20:23 ` Jan Djärv
2010-09-26 22:00 ` Eli Zaretskii
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.