You can exec() the same program from itself with all files still open. The tough part becomes knowing how many files you have open.
Since you have control of the command line upon re-exec()ing your code, you can pass that on the command line. File descriptors can come in handy here. The fdopen(3) action of Perl's open() can make life bearable when needing to use numbers as file descriptors instead of having the file handles from the previous incarnation of the program. You can clone your descriptors back to filehandles as you please.
Update: Fixed a typo.
In reply to Re: Restarting a script without dropping clients
by mr_mischief
in thread Restarting a script without dropping clients
by Ahbeyra
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |