mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-21 19:20:21 +02:00
warning instead of error on multithreaded fork
* libguile/posix.c (scm_fork): Issue a warning instead of an error on a multithreaded fork. * doc/ref/posix.texi (Processes): Add note about multithreaded fork.
This commit is contained in:
parent
94027fe6ec
commit
22cdf986db
2 changed files with 21 additions and 3 deletions
|
@ -1260,8 +1260,12 @@ SCM_DEFINE (scm_fork, "primitive-fork", 0, 0, 0,
|
|||
async-signal-safe. We can't guarantee that in general. The best
|
||||
we can do is to allow forking only very early, before any call to
|
||||
sigaction spawns the signal-handling thread. */
|
||||
SCM_MISC_ERROR ("attempt to fork while multiple threads are running",
|
||||
SCM_EOL);
|
||||
scm_display
|
||||
(scm_from_latin1_string
|
||||
("warning: call to primitive-fork while multiple threads are running;\n"
|
||||
" further behavior unspecified. See \"Processes\" in the\n"
|
||||
" manual, for more information.\n"),
|
||||
scm_current_warning_port ());
|
||||
pid = fork ();
|
||||
if (pid == -1)
|
||||
SCM_SYSERROR;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue