-
Notifications
You must be signed in to change notification settings - Fork 722
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
Copying fifos hangs. #727
Open
bruce-one
wants to merge
27
commits into
shelljs:master
Choose a base branch
from
bruce-one:cp-fifo
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Copying fifos hangs. #727
Changes from 5 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
e17d624
Don't attempt to copy fifos.
bruce-one 52c412f
Avoid fifos via symlinks.
bruce-one e4a911d
Better replicate cp during direct fifo copies.
bruce-one eaaa40a
Bugfix: don't break offset during copies.
bruce-one 476d4b4
Test fix, use printf for osx not echo.
bruce-one c71edc2
Check exec exit code to fix tests on Windows.
bruce-one d469212
Skip fifo tests on Windows.
bruce-one 5689dc0
Typo.
bruce-one 777fe04
Shell out to create fifos during recursive copy.
bruce-one 8fa217b
Handle "recursive" flag for special non-files.
bruce-one 18c513e
Cleanup.
bruce-one be93375
Error messages.
bruce-one 599a2c5
mknod fails without root.
bruce-one 2d3af53
Linting.
bruce-one d942f3f
Permissions on special files.
bruce-one fad43aa
Logging.
bruce-one e6760bb
Lint.
bruce-one 045c290
chown and chmod special files.
bruce-one 40518f7
Use execFileSync for safety and simplicity.
bruce-one c69ddc3
Use mkfifo for fifo creation due for OSX compat.
bruce-one b2932cf
Replace unix specific code with warning.
bruce-one 6a4a6a0
Log that special files were skipped.
bruce-one f7957bf
Revert "Log that special files were skipped."
bruce-one a4e5411
Doc.
bruce-one 117894c
Treat special files the same whether recursive or not.
bruce-one 48a0198
Doc.
bruce-one 0d70322
Build doc.
bruce-one File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer to see
shx echo -n test1
here. Appveyor may have the command, but it may not be consistent with unixprintf
, and I don't think it's available by default on Windows systems.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Iirc, osx's echo doesn't support the
-n
... (Which was why I changed it initially)Also worth noting named pipes aren't supported directly by Windows (only via cygwin etc, which didn't appear reliable)
(Could match the
\n
though if echo is preferred)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shx echo
is platform agnostic, so it runs on OS X, Win, and Linux. The behavior is guaranteed to be the same across all machines, which is what you want out of an external dependency.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yeah :-) good point :-)
Is it possible to easily shell out to shelljs's echo implementation? (I've shelled out here because the event loop is blocked by the cp, so need a way to get data into the fifo in the background; and atm this is shelling out to the /bin/sh impl (iirc?) and using it's echo/printf (although maybe there's a better way?)).