unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* open-pipe deadlocked
@ 2011-07-29 13:56 rixed
  2011-08-02 21:24 ` Andreas Rottmann
  2011-08-10 18:31 ` rixed
  0 siblings, 2 replies; 12+ messages in thread
From: rixed @ 2011-07-29 13:56 UTC (permalink / raw)
  To: guile-user

Hello !

Sometime, my progam calls open-input-pipe and the forked child hangs
waiting for a lock (so after the fork but before executing the command).

So I read the code for open-process, especially what happens between the
fork and the execlp, and I noticed several potential problems :

- all ports are closed, but what about other open files that are not
  ports ? My application opens many files in C that are not known to
  guile. Shouldn't these be closed as well ?

- what if when forking some other guile thread hold one of the internal
  lock (for instance, the lock protecting the port table) ? Then the
  code between the fork and the exec (which loop on all ports, amongst
  other things) may try to grab this internal mutex, deadlocking.

Any thoughs?




^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2011-09-05  7:30 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-29 13:56 open-pipe deadlocked rixed
2011-08-02 21:24 ` Andreas Rottmann
2011-08-04  7:18   ` rixed
2011-09-01 21:45     ` Ludovic Courtès
2011-09-02  8:13       ` rixed
2011-09-02  9:26       ` rixed
2011-09-02 10:58         ` rixed
2011-09-02 10:58         ` rixed
2011-09-03 20:32         ` Ludovic Courtès
2011-09-04 10:18           ` Andy Wingo
2011-09-05  7:30             ` rixed
2011-08-10 18:31 ` rixed

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).