#define FUNC_NAME s_scm_fork
{
int pid;
+ scm_i_finalizer_pre_fork ();
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
SCM bv;
size_t cpu;
- bv = scm_c_make_bitvector (sizeof (*cs), SCM_BOOL_F);
+ bv = scm_c_make_bitvector (CPU_SETSIZE, SCM_BOOL_F);
- for (cpu = 0; cpu < sizeof (*cs); cpu++)
+ for (cpu = 0; cpu < CPU_SETSIZE; cpu++)
{
if (CPU_ISSET (cpu, cs))
/* XXX: This is inefficient but avoids code duplication. */
scm_init_posix ()
{
scm_add_feature ("posix");
+#ifdef EXIT_SUCCESS
+ scm_c_define ("EXIT_SUCCESS", scm_from_int (EXIT_SUCCESS));
+#endif
+#ifdef EXIT_FAILURE
+ scm_c_define ("EXIT_FAILURE", scm_from_int (EXIT_FAILURE));
+#endif
#ifdef HAVE_GETEUID
scm_add_feature ("EIDs");
#endif