in reply to $SIG{INT} unlink problem

Thank you for the help, all. You've made me realize how little I actually remember of the signal handling portion of Unix.

sauoq - Your initial comment was one of the theories I had, but didn't make any sense since either it should have been already created (since after the signal handler's done killing it, the file is indeed there), or not created at all. Do you know what might cause that behavior?

aristotle, your handler makes sense on a couple of levels - particularly, I'll only be actually doing cleanup in a location where I have control of the code, so I don't have to wonder at the behavior of LWP. Additionally, I was trying to remove the file, then letting it finish downloading (forgot to exit), none too bright. Even after that change, though, the signal handler's not removing the file - claims it doesn't exist yet, and yet there it is after the program terminates.

So I'll just use your idea and tell it to clean up afterwards if it gets SIGINTed.

fokat and wtp, thanks for the correct forking method - IIRC, my systems programming teacher had the (poor, but amusing) attitude that if the program's having fork problems, there's probably something worse wrong with the system anyway.

JSchmitz - I have looked at the Sun tools every once in a while. I admit it's been six months or more since I have, and perhaps they've gotten better. I should try them again and see whether they'll save me the work. As I said, though, this problem's almost as much for the experience as for the end product ;-)

Thanks, all!