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

Use node-mkfifo #1

Open
piranna opened this issue Jul 21, 2016 · 6 comments
Open

Use node-mkfifo #1

piranna opened this issue Jul 21, 2016 · 6 comments

Comments

@piranna
Copy link

piranna commented Jul 21, 2016

Use node-mkfifo module instead of Node.js child_process build-in.

@raksooo
Copy link
Owner

raksooo commented Jul 17, 2017

Are there any advantages? It seems to me like it provides the same functionality but with extra dependencies.

@piranna
Copy link
Author

piranna commented Jul 17, 2017

Are there any advantages?

Don't depend on external commands that although standard POSIX ones, potentially could not be available on the underlying system.

@raksooo
Copy link
Owner

raksooo commented Jul 17, 2017

I will still rely on external commands for reading and writing. I remember trying to read and write using Node's file system module but it didn't work as expected for fifo-files. Unless there are replacement for them too it's not worth it in my opinion.

@piranna
Copy link
Author

piranna commented Jul 17, 2017

node-mkfifo is for creation of the pipe. You can use the fs.createReadStream() and fs.createWriteStream() functions giving them the file descriptor of the already opened pipe file, that's the correct way to use them.

@raksooo
Copy link
Owner

raksooo commented Jul 17, 2017

Ok, I will look into this when I've got more time. Thank you!

@piranna
Copy link
Author

piranna commented Jul 17, 2017 via email

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