Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#8 Close extraneous fds

closed-fixed
nobody
None
5
2012-09-23
2012-09-18
No

nwipe should close the file descriptors for the devices its not operating on. At the very least, its quite annoying to have a removable drive locked as 'in use' for over 30 hours while nwipe blanks another drive. At best, its a good precaution to avoid writing to the wrong handle with such severe penalties in case of a bug.

Discussion

  • Andy Beverley
    Andy Beverley
    2012-09-22

     
    Attachments
  • Andy Beverley
    Andy Beverley
    2012-09-22

    Thanks for the bug report. I am unable to reproduce on my system, but believe I know what is causing the problem.

    Could you please try the attached patch. If it works then I will release a new version.

    Copy the patch to the nwipe tree and run "patch -p1 < nwipe-3568750.patch"

    Thanks,

    Andy

     
  • That did it for me. /proc/n/fd only shows /dev/urandom and /dev/mapper/control open now by nwipe after the initial scan.

    The specific device to wipe is then open when wiping, but no others.

     
  • Andy Beverley
    Andy Beverley
    2012-09-23

    Fixed in version 0.11

     
  • Andy Beverley
    Andy Beverley
    2012-09-23

    • status: open --> closed-fixed