Update - Sutdown BUG!



This code is run as root in a gnome application.

void
do_shutdown()
{
   int res;
   char *command;
	
    do  {
	printf("Waiting for Lock\n");
	if (isfile("/var/lock/Lck..Fire")) {
		printf("Lock is present\n");
		command = g_strdup("ls /var/lock >/home/john/dir.dat");
		res = system(command);
		g_free(command);
	}
	} while (isfile("/var/lock/Lck..Fire")==0);

	/* shutdown 
	 * strange behavior inhibts the production of lock file
	 * since shutdown is suppose to trigger a sync the data 
	 * should have been flushed. So why is it inhibiting lock file
	 */
	 
	printf(_("LnxFire Catastrophic ERROR Intruder Detected Shutdown\n"));
	if (!debug) res = system ("shutdown -h -t secs:90 now \"LnxFire Catastrophic ERROR Intruder Detected Shutdown!\"");
	gtk_exit(1);
}

output of dir.dat (pre- shutdown)
	Lck..Fire
	console
	console.lock
	samba
	subsys
	xemacs

The file is present at shutdown yet on reboot fails to be
in /var/lock I would consider this a major bug.

Distribution Mandrake 7.0  Nautilus Evolution Helix
Is this action repeated in Mandrake  7.1 & Redhat 6.2 ?

 Email:    john hawk gte net





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]