[Top][All Lists]

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

[Guile-commits] GNU Guile branch, wip-threads-and-fork, created. v2.1.0-

From: Andy Wingo
Subject: [Guile-commits] GNU Guile branch, wip-threads-and-fork, created. v2.1.0-32-g6fa7502
Date: Tue, 14 Feb 2012 21:51:04 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

The branch, wip-threads-and-fork has been created
        at  6fa75029fa6e17357cb853017aa597205638c867 (commit)

- Log -----------------------------------------------------------------
commit 6fa75029fa6e17357cb853017aa597205638c867
Author: Andy Wingo <address@hidden>
Date:   Wed Feb 8 20:11:57 2012 +0100

    web server: use CLOEXEC
    * module/web/server/http.scm (http-read): Pass SOCK_CLOEXEC to

commit d7bbda6fd7b79917bd963f6c156c8539414a35f8
Author: Andy Wingo <address@hidden>
Date:   Wed Feb 8 20:11:28 2012 +0100

    optional flags arg to scm_accept, which uses accept4
    * libguile/socket.c (scm_accept): Take another argument, "flags".  This
      dispatches to accept4, if it's available, to possibly set the CLOEXEC
      flag on the accepted port.

commit f503c1d6be378c3351b7011b07c4fa32230698f1
Author: Andy Wingo <address@hidden>
Date:   Wed Feb 8 20:09:36 2012 +0100

    primitive-move->fdes preserves CLOEXEC flag
    * libguile/ioext.c (scm_primitive_move_to_fdes): Use dup3 to preserve
      the CLOEXEC flag, if appropriate.

commit 7565b9fc09242b0adfd81f1390e75ced3f894078
Author: Andy Wingo <address@hidden>
Date:   Wed Feb 8 20:08:15 2012 +0100

    add file-port-close-on-exec?; popen takes advantage of it.
    * libguile/fports.c (scm_i_evict_port): Use F_DUPFD_CLOEXEC if the port
      is CLOEXEC.
      (scm_file_port_close_on_exec_p): New interface.
      (scm_i_fdes_to_port): Use F_GETFD on the fd to see if it is cloexec,
      and if it is, mark it in the scm_t_fport.  That way popen.scm won't
      have to do anything about it.
    * module/ice-9/popen.scm (ensure-fdes): No need for false-if-exception
      (open-process): Rework the port-for-each call to not bother with file
      descriptors that are CLOEXEC.

commit a01a9308f051ee1c7e214642d43a750dcd6dce7f
Author: Andy Wingo <address@hidden>
Date:   Wed Feb 8 20:05:04 2012 +0100

    fcntl: support F_DUPFD_CLOEXEC and O_CLOEXEC.
    * libguile/filesys.c (scm_fcntl): Document F_DUPFD_CLOEXEC.
      (scm_init_filesys): Define O_CLOEXEC and F_DUPFD_CLOEXEC.

commit 86150ed040b3dcada132bfa02ac4d0b69d5bc3d2
Author: Andy Wingo <address@hidden>
Date:   Tue Feb 14 14:30:48 2012 +0100

    wrap iconv_open / iconv_close with a lock to help in thread/fork issues
    * libguile/bytevectors.c (STRING_TO_UTF, scm_string_to_utf8)
    * libguile/ports.c (open_iconv_descriptors, close_iconv_descriptors):
    * libguile/strings.c (scm_from_stringn, scm_to_stringn): Wrap operations
      that acquire and destroy iconv contexts with a mutex.  While iconv is
      threadsafe, internally it uses a lock, and we need to make sure when
      we fork() that no one has that lock -- so we surround it with another
      one.  Gross.

commit 7329a5dba1eeae8037d4321b05a539aa61f33b11
Author: Andy Wingo <address@hidden>
Date:   Wed Feb 8 19:57:41 2012 +0100

    use scm_c_atfork_lock_static_mutex for guile's static mutexen
    * libguile/async.c (scm_init_async):
    * libguile/deprecation.c (scm_init_deprecation):
    * libguile/fluids.c (scm_init_fluids):
    * libguile/gc.c (scm_init_gc):
    * libguile/instructions.c (scm_bootstrap_instructions):
    * libguile/ports.c (scm_init_ports):
    * libguile/posix.c (scm_init_posix):
    * libguile/strings.c (string_get_handle):
    * libguile/threads.c (scm_init_threads): Use the atfork mutex mechanism
      to lock a number of static mutexen.

commit 585eb4f702213682c90215b8cdd791be4695805a
Author: Andy Wingo <address@hidden>
Date:   Wed Feb 8 19:52:42 2012 +0100

    add scm_c_atfork_lock_static_mutex
    * libguile/posix.h:
    * libguile/posix.c (scm_c_atfork_lock_static_mutex): New interface.

commit 9f6ac5d71de191146c9958725b16e19876cb84dc
Author: Andy Wingo <address@hidden>
Date:   Wed Feb 8 15:47:22 2012 +0100

    add atfork interface
    * libguile/posix.h:
    * libguile/posix.c (scm_c_atfork): New interface.
      (scm_fork): Wrap fork calls in atfork pre/post invocations, and
      finally a GC_call_with_alloc_lock.  It's an attempt to grab the
      interesting mutexes in Guile.
    * libguile/weak-set.c (make_weak_set):
    * libguile/weak-table.c (make_weak_table): Use atfork mechanism to lock
      and unlock weak sets and weak tables during a fork(), in such a way
      that does not prevent those tables from being gc'd.

commit 981bace7e48c3f59c124a6518be3384f5d47ba44
Author: Andy Wingo <address@hidden>
Date:   Tue Feb 14 14:33:19 2012 +0100

    fix a race (one of many) relating to close-port
    * libguile/ports.c (scm_close_port): Remove the port from the weak
      set before nulling out the stream.  Fixes a case in which
      port-for-each traversers can see a NULL stream.
    better handling for exceptions in port free / close vmethods
    * libguile/fports.c (close_the_fd, fport_close): Arrange to always close
      the fd, even if the flush procedure throws an exception.  Perhaps the
      port machinery should do this for us, though.  Don't wrap the close
      call in SCM_SYSCALL, EINTR leaves the fd in an unspecified state.
      Don't bother freeing buffers, the collector will handle that; simply
      drop references via scm_port_non_buffer.
    * libguile/ports.c (do_free, finalize_port): Catch exceptions caused by
      the free procedure.  Don't bother setting the stream to 0 at all.
      (scm_close_port): Ensure that exceptions thrown by the "close"
      procedure don't prevent the port from being marked as closed.


GNU Guile

reply via email to

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