Skip to content
Advertisement

Tag: unix

Decrease the number of calls

I have arraylist of filenames (java) and I want to delete these files using rm but it is time consuming can I do batching using xargs or something else which can help to delete files faster. Answer Don’t use rm. Use Java. As others have pointed out, spawning a process is much slower than doing it in your program. Also,

How do I trigger the default signal handling behavior?

In my Java application I want to capture SIGINTs, do some pre-processing, and then let the default behavior (process termination) run. I would think I could do something like this: However when I send at SIGINT to this application, I get a SEGV: It seems SignalHandler.SIG_DFL is not meant to be called directly (even from other signal handling code). So

Advertisement