Mercurial > hg > xemacs-beta
comparison src/callproc.c @ 611:38db05db9cb5
[xemacs-hg @ 2001-06-08 12:21:09 by ben]
------ gc-in-window-procedure fixes ------
alloc.c: Create "post-gc actions", to avoid those dreaded "GC during window
procedure" problems.
event-msw.c: Abort, clean and simple, when GC in window procedure. We want
to flush these puppies out.
glyphs-msw.c: Use a post-gc action when destroying subwindows.
lisp.h: Declare register_post_gc_action().
scrollbar-msw.c: Use a post-gc action when unshowing scrollbar windows, if in gc.
redisplay.c: Add comment about the utter evilness of what's going down here.
------ cygwin setitimer fixes ------
Makefile.in.in: Compile profile.c only when HAVE_SETITIMER.
nt.c: Style fixes.
nt.c: Move setitimer() emulation to win32.c, because Cygwin needs it too.
profile.c: Make sure we don't compile if no setitimer(). Use qxe_setitimer()
instead of just plain setitimer().
signal.c: Define qxe_setitimer() as an encapsulation around setitimer() --
call setitimer() directly unless Cygwin or MS Win, in which case
we use our simulated version in win32.c.
systime.h: Prototype mswindows_setitimer() and qxe_setitimer(). Long
comment about "qxe" and the policy regarding encapsulation.
win32.c: Move setitimer() emulation here, so Cygwin can use it.
Rename a couple of functions and variables to be longer and more
descriptive. In setitimer_helper_proc(), send the signal
using either mswindows_raise() or (on Cygwin) kill(). If for
some reason we are still getting lockups, we'll change the kill()
to directly invoke the signal handlers.
------ windows shell fixes ------
callproc.c, ntproc.c: Comments about how these two files must die.
callproc.c: On MS Windows, init shell-file-name from SHELL, then COMSPEC,
not just COMSPEC. (more correct and closer to FSF.) Don't
force a value for SHELL into the environment. (Comments added
to explain why not.)
nt.c: Don't shove a fabricated SHELL into the environment. See above.
------ misc fixes ------
glyphs-shared.c: Style correction.
xemacs-faq.texi: Merge in the rest of Hrvoje's Windows FAQ. Redo section 7
to update current reality and add condensed versions of
new changes for 21.1 and 21.4. (Not quite done for 21.4.)
Lots more Windows updates.
process.el: Need to quote a null
argument, too. From Dan Holmsand.
startup.el:
startup.el: Call MS Windows init function.
win32-native.el: Correct comments at top. Correctly handle passing arguments
to Cygwin programs and to bash. Fix quoting of zero-length
arguments (from Dan Holmsand). Set shell-command-switch based
on shell-file-name, which in turn comes from env var SHELL.
author | ben |
---|---|
date | Fri, 08 Jun 2001 12:21:27 +0000 |
parents | 183866b06e0b |
children | b39c14581166 |
comparison
equal
deleted
inserted
replaced
610:45ba69404a1f | 611:38db05db9cb5 |
---|---|
1 /* Synchronous subprocess invocation for XEmacs. | 1 /* Old synchronous subprocess invocation for XEmacs. |
2 Copyright (C) 1985, 86, 87, 88, 93, 94, 95 Free Software Foundation, Inc. | 2 Copyright (C) 1985, 86, 87, 88, 93, 94, 95 Free Software Foundation, Inc. |
3 | 3 |
4 This file is part of XEmacs. | 4 This file is part of XEmacs. |
5 | 5 |
6 XEmacs is free software; you can redistribute it and/or modify it | 6 XEmacs is free software; you can redistribute it and/or modify it |
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
19 Boston, MA 02111-1307, USA. */ | 19 Boston, MA 02111-1307, USA. */ |
20 | 20 |
21 /* Synched up with: Mule 2.0, FSF 19.30. */ | 21 /* Synched up with: Mule 2.0, FSF 19.30. */ |
22 /* Partly sync'ed with 19.36.4 */ | 22 /* Partly sync'ed with 19.36.4 */ |
23 | |
24 | |
25 /* #### This ENTIRE file is only used in batch mode. | |
26 | |
27 We only need two things to get rid of both this and ntproc.c: | |
28 | |
29 -- my `stderr-proc' ws, which adds support for a separate stderr | |
30 in asynch. subprocesses. (it's a feature in `old-call-process-internal'.) | |
31 -- a noninteractive event loop that supports processes. | |
32 */ | |
23 | 33 |
24 #include <config.h> | 34 #include <config.h> |
25 #include "lisp.h" | 35 #include "lisp.h" |
26 | 36 |
27 #include "buffer.h" | 37 #include "buffer.h" |
877 } | 887 } |
878 | 888 |
879 { | 889 { |
880 /* Initialize shell-file-name from environment variables or best guess. */ | 890 /* Initialize shell-file-name from environment variables or best guess. */ |
881 #ifdef WIN32_NATIVE | 891 #ifdef WIN32_NATIVE |
882 const char *shell = egetenv ("COMSPEC"); | 892 const char *shell = egetenv ("SHELL"); |
883 if (!shell) shell = "\\WINNT\\system32\\cmd.exe"; | 893 if (!shell) shell = egetenv ("COMSPEC"); |
894 /* Should never happen! */ | |
895 if (!shell) shell = (GetVersion () & 0x80000000 ? "command" : "cmd"); | |
884 #else /* not WIN32_NATIVE */ | 896 #else /* not WIN32_NATIVE */ |
885 const char *shell = egetenv ("SHELL"); | 897 const char *shell = egetenv ("SHELL"); |
886 if (!shell) shell = "/bin/sh"; | 898 if (!shell) shell = "/bin/sh"; |
887 #endif | 899 #endif |
900 | |
901 #if 0 /* defined (WIN32_NATIVE) */ | |
902 /* BAD BAD BAD. We do not wanting to be passing an XEmacs-created | |
903 SHELL var down to some inferior Cygwin process, which might get | |
904 screwed up. | |
905 | |
906 There are a few broken apps (eterm/term.el, eterm/tshell.el, | |
907 os-utils/terminal.el, texinfo/tex-mode.el) where this will | |
908 cause problems. Those broken apps don't look at | |
909 shell-file-name, instead just at explicit-shell-file-name, | |
910 ESHELL and SHELL. They are apparently attempting to borrow | |
911 what `M-x shell' uses, but that latter also looks at | |
912 shell-file-name. What we want is for all of these apps to look | |
913 at shell-file-name, so that the user can change the value of | |
914 shell-file-name and everything will work out hunky-dorey. | |
915 */ | |
916 | |
917 if (!egetenv ("SHELL")) | |
918 { | |
919 CBufbyte *faux_var = alloca_array (CBufbyte, 7 + strlen (shell)); | |
920 sprintf (faux_var, "SHELL=%s", shell); | |
921 Vprocess_environment = Fcons (build_string (faux_var), | |
922 Vprocess_environment); | |
923 } | |
924 #endif /* 0 */ | |
888 | 925 |
889 Vshell_file_name = build_string (shell); | 926 Vshell_file_name = build_string (shell); |
890 } | 927 } |
891 } | 928 } |
892 | 929 |