static struct file_struct *cleanup_file;
static int cleanup_fd1, cleanup_fd2;
static struct map_struct *cleanup_buf;
+static int cleanup_pid = 0;
void exit_cleanup(int code)
{
if (code) {
kill_all(SIGUSR1);
}
+ if ((cleanup_pid != 0) && (cleanup_pid == (int) getpid()))
+ unlink(lp_pid_file());
exit(code);
}
cleanup_fd1 = fd1;
cleanup_fd2 = fd2;
}
+
+void cleanup_set_pid(int pid)
+{
+ cleanup_pid = pid;
+}