converter and system()

A question about io-net module and system() function.

I wrote an io-net converter, and try to use system() to call some
script.
But the action is failed. return value=-1, and errno=9(Bad file
descriptor??)
Have anyone met the same problem?

I’m not sure what is the cause, so I also tried it in a executes and an
io-net filter.
In the executes, the action works correctly.
In the io-net filter, the action fails.

Then I try execl() instead of system() in the converter and filter.
However, it still fails, finally I even can’t find the directory
/dev/io-net.

Is there any thing I should take care when I want to call system() in a
converter?
Or is there any way to achieve the desire?

Thanks

I use spawn() today, and it works.(yes, I should not use exec*)
But I’m not sure if my parameter is suitable for the converter.
I’m not familiar with the knowledge of file descriptors.
I pass three file descriptors(o, 1, 2) to the child to inherit.
It works but is it appropriate?


Codante wrote:

A question about io-net module and system() function.

I wrote an io-net converter, and try to use system() to call some
script.
But the action is failed. return value=-1, and errno=9(Bad file
descriptor??)
Have anyone met the same problem?

I’m not sure what is the cause, so I also tried it in a executes and an
io-net filter.
In the executes, the action works correctly.
In the io-net filter, the action fails.

Then I try execl() instead of system() in the converter and filter.
However, it still fails, finally I even can’t find the directory
/dev/io-net.

Is there any thing I should take care when I want to call system() in a
converter?
Or is there any way to achieve the desire?

Thanks