-
-
Notifications
You must be signed in to change notification settings - Fork 252
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
EBUSY is not handled properly in SmartOS(Solaris) enviroment. #123
Comments
Hi, Thank you. |
Hi, ebusy_bin.js #!/usr/node/bin/node var rimraf = require('./') var help = false var dashdash = false var args = process.argv.slice(2).filter(function(arg) { if (dashdash) return !!arg else if (arg === '--') dashdash = true else if (arg.match(/^(-+|\/)(h(elp)?|\?)$/)) help = true else return !!arg }); if (help || args.length === 0) { // If they didn't ask for help, then this is not a "success" var log = help ? console.log : console.error log('Usage: rimraf ') log('') log(' Deletes all files and folders at "path" recursively.') log('') log('Options:') log('') log(' -h, --help Display this usage info') process.exit(help ? 0 : 1) } else { args.forEach(function(arg) { rimraf(arg, function(err){ if (err) console.log("ERROR: " + err.code); }); }) } And bellow is test invocation method: tar xvfz git-2.8.0.tar.gz ./ebusy_bin.js ./git-2.8.0 (To see EBUSY error you should run the above code repeatedly.) The output is as follows when EBUSY error occurs: ERROR: EBUSY And the directory contents are left over as follows, but the contents are random: total 39458 -rwxr-xr-x 4 root root 9971208 Nov 2 03:54 git-init -rwxr-xr-x 4 root root 9971208 Nov 2 03:54 git-ls-tree -rwxr-xr-x 4 root root 9971208 Nov 2 03:54 git-mktag -rwxr-xr-x 4 root root 9971208 Nov 2 03:54 git-name-rev FYI, the test env information is as follows: node version: 0.10.26
UPDATE Thank you. |
Handling EBUSY on other systems seems fine to me. Would you like to submit a pull request? |
Yes, I'd like to. |
Fixed on 2.6 |
Hi,
I'm using rimraf module in SmartOS(based on solraris) environment.
I tried to remove huge(?) amount of files with this module, but I got "EBUSY" error.
In rimraf function in rimraf.js, EBUSY is only handled on Windows in retrial maner.
if (isWindows && (er.code === "EBUSY" || er.code === "ENOTEMPTY" || er.code === "EPERM") && busyTries < options.maxBusyTries) { busyTries ++
Are there any issues if "isWindows &&" is removed?
Thank you.
The text was updated successfully, but these errors were encountered: