Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

child_process doesn't work with fibers #1

Closed
lm1 opened this issue Jan 22, 2011 · 3 comments
Closed

child_process doesn't work with fibers #1

lm1 opened this issue Jan 22, 2011 · 3 comments

Comments

@lm1
Copy link
Contributor

lm1 commented Jan 22, 2011

For the testcase:

require('child_process').exec('echo A', function(err, stdout){
  if (err) console.log('Error:', err);
  else console.log('Output:', stdout);
});

I'm getting the following error with node-fibers loaded:

Error: { message: 'Command failed: /bin/sh: symbol lookup error: /home/lm/node-fibers/coroutine.so: undefined symbol: dlsym\n',
  stack: [Getter/Setter],
  killed: false,
  code: 127,
  signal: null }
@laverdet
Copy link
Owner

Hey what OS & Node version are you running? I can't reproduce this on OS X Snow Leopard with node 0.3.x or Gentoo Linux with node 0.2.x or 0.3.x.

Could you apply this patch to the makefile and then run "make clean all" and tell me if it fixes the problem?

diff --git a/Makefile b/Makefile
index 13fd1da..7d18b47 100644
--- a/Makefile
+++ b/Makefile
@@ -34,7 +34,7 @@ all: $(COROUTINE_SO) node-fibers.node
 $(COROUTINE_SO_FULL): $(COROUTINE_SO)

 $(COROUTINE_SO): coroutine.cc
-       $(CXX) $(CPPFLAGS) $(CPP_DYFLAGS) -o $@ $^ -lpthread
+       $(CXX) $(CPPFLAGS) $(CPP_DYFLAGS) -o $@ $^ -lpthread -ldl

 node-fibers.node: node-fibers.cc $(COROUTINE_SO_FULL)
        $(CXX) $(CPPFLAGS) $(CPP_NODEFLAGS) -o $@ $^

@lm1
Copy link
Contributor Author

lm1 commented Jan 23, 2011

Yes, it resolves the issue -- thanks!

$ uname -a
Linux debian 2.6.32-5-686 # 1 SMP Fri Dec 10 16:12:40 UTC 2010 i686 GNU/Linux
$ node --version
v0.3.7-pre

@laverdet
Copy link
Owner

Great! I went ahead and committed that in a203d61.

tailsu referenced this issue in Icenium/node-fibers Mar 4, 2014
add method that asserts that every future has been accounted for
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants