[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#13079: closed (24.3.50; Emacs cannot create subpro

From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#13079: closed (24.3.50; Emacs cannot create subprocess)
Date: Sat, 15 Dec 2012 13:43:02 +0000

Your message dated Sat, 15 Dec 2012 15:41:41 +0200
with message-id <address@hidden>
and subject line Re: bug#13079: 24.3.50; Emacs cannot create subprocess
has caused the debbugs.gnu.org bug report #13079,
regarding 24.3.50; Emacs cannot create subprocess
to be marked as done.

(If you believe you have received this mail in error, please contact

13079: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13079
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 24.3.50; Emacs cannot create subprocess Date: Tue, 4 Dec 2012 16:03:56 +0800

I've noticed emacs cannot create subprocess in some cases:

  (dotimes (i 25)
    (call-process-region (point-min) (point-min) "ddeclient" t 0 nil
"SUMATRA" "control")
    (message "%d" i)))

After executed above codes, emacs report:

"Spawning child process" "resource temporarily unavailable"

My emacs running environment as follows:

In GNU Emacs (i386-mingw-nt6.1.7601)
 of 2012-11-30 on ALAN-NB
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --with-gcc (4.5) --cflags -I/ImageLib/giflib-4.1.6/lib
 -I/ImageLib/zlib-1.2.5 -I/ImageLib/libpng-1.4.5 -I/ImageLib/jpeg-8c
 -I/ImageLib/libxpm-3.5.8-w32-src/include -I/ImageLib/tiff-3.9.4/libtiff

Important settings:
  value of $LANG: zh_CN.GBK
  locale-coding-system: cp936
  default enable-multibyte-characters: t

Major mode: Emacs-Lisp

Minor modes in effect:
  eldoc-mode: t
  paredit-mode: t
  TeX-PDF-mode: t
  savehist-mode: t
  desktop-save-mode: t
  anything-dired-mode: Enable anything completion in Dired functions.
Bindings affected are C, R, S, H.
This is deprecated for Emacs24+ users, use `ac-mode' instead.
  shell-dirtrack-mode: t
  show-paren-mode: t
  recentf-mode: t
  delete-selection-mode: t
  auto-image-file-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  size-indication-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t
  hs-minor-mode: t

Recent input:
C-p C-p C-n M-m ; ; C-n C-n C-n C-w C-p C-p C-p C-y
C-p <tab> C-n C-n C-e C-x C-e C-x q q C-x C-e q C-x
C-e q M-x b u g <tab> C-g <f9> b u g . * r e p o r
t C-a C-e <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> e m a c s <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
C-a e m a c s . * C-n <return> <return> <return> C-x
1 C-c C-k C-g <wheel-down> <double-wheel-down> <triple-wheel-down>
<triple-wheel-down> <wheel-down> <double-wheel-down>
<triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
<triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
<wheel-up> <double-wheel-up> <triple-wheel-up> <triple-wheel-up>
<triple-wheel-up> <wheel-up> <double-wheel-up> <triple-wheel-up>
<triple-wheel-up> <triple-wheel-up> <wheel-up> <double-wheel-up>
<triple-wheel-up> <triple-wheel-up> <triple-wheel-up>
<triple-wheel-up> <triple-wheel-up> <triple-wheel-up>
<triple-wheel-up> <triple-wheel-up> <triple-wheel-up>
<triple-wheel-up> <triple-wheel-up> <triple-wheel-up>
<triple-wheel-up> <wheel-up> <double-wheel-up> <triple-wheel-up>
<triple-wheel-up> <help-echo> <down-mouse-1> <mouse-1>
<down-mouse-1> <mouse-1> <down-mouse-1> <mouse-1> <down-mouse-1>
<mouse-1> <down-mouse-1> <mouse-movement> <mouse-movement>
<drag-mouse-1> <down-mouse-1> <mouse-1> <down-mouse-1>
<mouse-1> <down-mouse-1> <mouse-1> <wheel-down> <double-wheel-down>
<triple-wheel-down> <triple-wheel-down> <wheel-down>
<double-wheel-down> <triple-wheel-down> <triple-wheel-down>
<wheel-down> <double-wheel-down> <triple-wheel-down>
<triple-wheel-down> C-c C-c n <help-echo> <down-mouse-1>
<drag-mouse-1> C-x 1 <wheel-up> <double-wheel-up> <triple-wheel-up>
<triple-wheel-up> <triple-wheel-up> <wheel-up> <double-wheel-up>
<triple-wheel-up> <triple-wheel-up> <triple-wheel-up>
<triple-wheel-up> <triple-wheel-up> <triple-wheel-up>
<triple-wheel-up> <triple-wheel-up> <triple-wheel-up>
<down-mouse-1> <mouse-1> <down-mouse-1> <mouse-1> <down-mouse-1>
<mouse-1> <down-mouse-1> <mouse-1> <down-mouse-1> <mouse-1>
<down-mouse-1> <mouse-1> <down-mouse-1> <mouse-1> <down-mouse-1>
<mouse-1> <down-mouse-1> <mouse-1> C-/ C-/ C-/ C-/
C-x k <return> C-x C-b a a q M-x M-p <return> <down-mouse-1>
<mouse-1> X b <backspace> <backspace> <S-down> <S-down>
<S-down> C-g <up> <up> <up> C-x b s c r <return> C-x
b C-g C-h e M-> C-p C-p C-p C-p C-p C-p C-p C-p C-p
C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p M-v C-s
s w a n C-s C-s C-g C-g C-x b <return> C-n C-n C-n
C-n C-n C-n C-n C-n C-n C-n C-n C-e C-x C-e <help-echo>
<down-mouse-1> <mouse-movement> <mouse-movement> <drag-mouse-1>
<help-echo> M-w q C-x b C-g M-x M-p <return>

Recent messages:
Mark set
byte-code: Beginning of buffer [6 times]
Undo! [3 times]
user-error: No further undo information
Quit [2 times]
Mark set
Entering debugger...
Back to top level.

Load-path shadows:
None found.

(shadow sort mail-extr gnus-msg gnus-art mm-uu mml2015 epg-config
mm-view mml-smime smime dig gnus-sum nnoo gnus-group gnus-undo nnmail
mail-source gnus-start gnus-spec gnus-int gnus-range gnus-win gnus
gnus-ems nnheader emacsbug message rfc822 mml mml-sec mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
sendmail rfc2047 rfc2045 ietf-drums mail-utils novice highlight-symbol
hi-lock misearch multi-isearch vc-git bm bs macros help-mode debug rect
hideshow eldoc paredit ind-util reftex-auc preview prv-emacs info
reporter tex-buf tex-fold cdlatex texmathp reftex-dcr reftex reftex-vars
font-latex latex derived tex-style tex savehist desktop saveplace
bbdb-autoloads bbdb timezone preview-latex tex-site auto-loads org-clock
org-exp ob-exp org-exp-blocks org-agenda w32-browser anything-config
browse-url imenu bookmark pp rx anything-match-plugin
semantic/util-modes semantic/util semantic semantic/tag semantic/lex
semantic/fw loaddefs mode-local cedet org ob-tangle ob-ref ob-lob
ob-table org-footnote org-src ob-comint ob-keys org-pcomplete org-list
org-faces org-entities noutline outline org-version ob-emacs-lisp ob
org-compat org-macs ob-eval org-loaddefs xml grep compile tramp
tramp-compat tramp-loaddefs shell pcomplete comint format-spec dired-x
dired-aux anything smart-compile paren slime-autoloads cc-styles
cc-align cc-engine cc-vars cc-defs xcscope ring auto-install easy-mmode
ffap thingatpt find-func dired url url-proxy url-privacy url-expand
url-methods url-history url-cookie url-domsuf url-util url-parse
auth-source eieio gnus-util mm-util mail-prsvr password-cache url-vars
mailcap windmove cal-china-x cl-macs gv cl cl-lib cal-china lunar solar
cal-dst holidays hol-loaddefs cal-menu calendar cal-loaddefs window+
uniquify midnight filecache ido recentf tree-widget wid-edit easymenu
edmacro kmacro byte-opt warnings bytecomp byte-compile cconv nadvice
advice help-fns server ps-ccrypt delsel image-file avoid ansi-color
time-date china-util tooltip ediff-hook vc-hooks lisp-float-type mwheel
dos-w32 ls-lisp w32-common-fns disp-table w32-win w32-vars tool-bar dnd
fontset image regexp-opt fringe tabulated-list newcomment lisp-mode
register page menu-bar rfn-eshadow timer select scroll-bar mouse
jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
minibuffer button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process w32 multi-tty

--- End Message ---
--- Begin Message --- Subject: Re: bug#13079: 24.3.50; Emacs cannot create subprocess Date: Sat, 15 Dec 2012 15:41:41 +0200
> Date: Wed, 05 Dec 2012 19:29:58 +0200
> From: Eli Zaretskii <address@hidden>
> Cc: address@hidden
> The harder part of this bug is the reason _why_ 'mktemp' fails.  Your
> command launches asynchronous subprocesses, creating a temporary file
> for each one of them where Emacs puts the contents of the region.  In
> this case, call-process-region arranges for the temporary files to be
> removed when the call to call-process returns, and then calls
> call-process.  However, since this is an async subprocess,
> call-process returns immediately, without waiting for the subprocess
> to exit, and Emacs deletes the temporary file.  This "cleanup" uses
> the non-portable (outside of Posix filesystems) trick of deleting a
> file while it is still open and used by the child process.  On
> Windows, this attempt to delete the file fails, and the file is left
> behind.
> The other part of this puzzle is that 'mktemp' as implemented by the
> Windows runtime can only have up to 42 simultaneous temporary files
> per calling thread (the MSDN documentation says 26, but that's a lie).
> Once there are 42 files in your TEMP directory created by a single
> Emacs session, all the future calls to 'mktemp' from the same session
> will fail, unless you manually delete those files.
> This part of the bug is harder to solve, because some code needs to be
> implemented that will defer deletion until the process exits.  So it
> is not solved yet.

Should be fixed now (revision 11244 on the trunk).  I was able to run
your test case multiple times without any errors, and after that,
there were no left-over temporary files in the temporary directory.

--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]