[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: wip-threads-and-fork
From: |
Ludovic Courtès |
Subject: |
Re: wip-threads-and-fork |
Date: |
Sun, 26 Feb 2012 23:03:08 +0100 |
User-agent: |
Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.93 (gnu/linux) |
Hi,
Andy Wingo <address@hidden> skribis:
> + if (scm_ilength (scm_all_threads ()) != 1)
> + /* Other threads may be holding on to resources that Guile needs --
> + it is not safe to permit one thread to fork while others are
> + running.
> +
> + In addition, POSIX clearly specifies that if a multi-threaded
> + program forks, the child must only call functions that are
> + 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);
Just like fork(2) lets one shoot themself in the foot, I think this is
beyond libguile’s scope. After all, libguile just wraps the OS
features, however crippled they may be.
Ludo’.
- wip-threads-and-fork, Andy Wingo, 2012/02/08
- Re: wip-threads-and-fork, Andy Wingo, 2012/02/22
- Re: wip-threads-and-fork, Andy Wingo, 2012/02/23
- Re: wip-threads-and-fork, Nala Ginrut, 2012/02/23
- Re: wip-threads-and-fork, Andy Wingo, 2012/02/23
- Re: wip-threads-and-fork, Nala Ginrut, 2012/02/23
- Re: wip-threads-and-fork, Andy Wingo, 2012/02/24
- Re: wip-threads-and-fork, Nala Ginrut, 2012/02/24
- Re: wip-threads-and-fork, Andy Wingo, 2012/02/24
- Re: wip-threads-and-fork, Nala Ginrut, 2012/02/24
- Re: wip-threads-and-fork,
Ludovic Courtès <=
- Re: wip-threads-and-fork, Andy Wingo, 2012/02/27
- Re: wip-threads-and-fork, Andy Wingo, 2012/02/24
- Re: wip-threads-and-fork, Nala Ginrut, 2012/02/24
- Re: wip-threads-and-fork, Nala Ginrut, 2012/02/24
- Re: wip-threads-and-fork, Andy Wingo, 2012/02/25
- Re: wip-threads-and-fork, Nala Ginrut, 2012/02/25
- Re: wip-threads-and-fork, Ludovic Courtès, 2012/02/26
- Re: wip-threads-and-fork, Andy Wingo, 2012/02/27