[ESS-bugs] ess-mode 5.3.7; use of fork library and ess 5.3.7 causes R to hang
William Knebel
billk at metrumrg.com
Fri Jul 25 17:51:14 CEST 2008
Submission of the following block of code results in R hanging with
the message "starting evaluation" until C-x g is pressed to break the
hanging R. Even at this point, only the first function is
executed. If this code is copied and pasted into
an R prompt from an xterm or sourced it runs fine. The fork package is
available on CRAN.
Any help is greatly appreciated.
Regards,
Bill
library(fork)
run<-TRUE
if(run){
pid <- fork(slave=NULL)
if (pid == 0){
cat("test me \n")
cat(paste(pid,"\n"))
exit()
}else
{
cat("test me2 \n")
}
}
if(run){
pid <- fork(slave=NULL)
if (pid == 0){
cat("test me \n")
cat(paste(pid,"\n"))
exit()
}else
{
cat("test me2 \n")
}
}
[ess-site.el]: ess-customize-alist=nil
[ess-site.el _2_]: ess-customize-alist=nil
(S): ess-s-versions-create making M-x defuns for
(R): ess-r-versions-create making M-x defuns for
(ess-setq-vars-LOCAL): language=S, dialect=R, buf=nil,
comint..echoes=nil, comint..sender=comint-simple-send
(ess-mode-1): ess-language=S, ess-dialect=R buf=test.R
(ess-mode-1.5): alist=((ess-local-customize-alist quote
R-customize-alist) (ess-dialect . R) (ess-suffix . R)
(ess-dump-filename-template ess-replace-regexp-in-string S$ ess-suffix
ess-dump-filename-template-proto) (ess-mode-syntax-table
. R-syntax-table) (ess-mode-editing-alist . R-editing-alist)
(ess-change-sp-regexp . ess-R-change-sp-regexp) (ess-help-sec-regex
. ess-help-R-sec-regex) (ess-help-sec-keys-alist
. ess-help-R-sec-keys-alist) (ess-loop-timeout . ess-S-loop-timeout)
(ess-cmd-delay . ess-R-cmd-delay) (ess-function-pattern
. ess-R-function-pattern) (ess-object-name-db-file . ess-r-namedb.el)
(ess-imenu-mode-function quote ess-imenu-R) (inferior-ess-program
. inferior-R-program-name) (inferior-ess-objects-command
. inferior-R-objects-command) (inferior-ess-font-lock-keywords
. inferior-ess-R-font-lock-keywords) (inferior-ess-search-list-command
. search()
) (inferior-ess-help-command . help("%s", htmlhelp=FALSE)
) (inferior-ess-help-filetype) (inferior-ess-exit-command . q())
(inferior-ess-exit-prompt . Save workspace image? [y/n/c]: )
(inferior-ess-primary-prompt . \([A-Z][][A-Za-z0-9.]*\)?> )
(inferior-ess-secondary-prompt . + ?) (inferior-ess-start-file)
(inferior-ess-start-args . ) (ess-STERM . iESS) (ess-editor
. R-editor) (ess-pager . R-pager) (ess-language . S)
(inferior-ess-exit-command . q()
) (inferior-ess-language-start eval inferior-S-language-start)
(comint-use-prompt-regexp-instead-of-fields . t))
(ess-mode-1.6): editing-alist=((paragraph-start concat \s-*$\|
page-delimiter) (paragraph-separate concat \s-*$\| page-delimiter)
(paragraph-ignore-fill-prefix . t) (require-final-newline . t)
(comment-start . #) (comment-add . 1) (comment-start-skip . #+ *)
(comment-column . 40) (indent-line-function quote S-indent-line)
(parse-sexp-ignore-comments . t) (ess-style . ess-default-style)
(ess-local-process-name) (ess-mode-syntax-table . S-syntax-table)
(add-log-current-defun-header-regexp . ^\(.+\)\s-+<-[
]*function) (font-lock-defaults quote (ess-R-mode-font-lock-keywords
nil nil ((46 . w) (95 . w)))))
(ess-setq-vars-LOCAL): language=S, dialect=R, buf=nil,
comint..echoes=nil, comint..sender=comint-simple-send
Finished setting up ESS-mode.
Emacs : GNU Emacs 22.1.1 (mac-apple-darwin, Carbon Version 1.6.0)
of 2008-06-23 on metrum-XXX.XXX.XXX.com
Package: ess-mode 5.3.7
current state:
==============
(setq
ess-language "S"
ess-dialect "R"
ess-ask-for-ess-directory t
ess-ask-about-transfile nil
ess-directory nil
ess-keep-dump-files "always"
ess-source-directory "/tmp/"
)
More information about the ESS-bugs
mailing list