No i dont as i only ever check for process which were created by my own program. Its hard to see why loginwindow wouldnt appear in the array returned because KERN_PROC_ALL is defined in mib which is passed in to sysctl() call.

        int mib[3] = { CTL_KERN, KERN_PROC, KERN_PROC_ALL };


Perhaps check execution of this loop and read through the NSLog() printout of the process names.

                const int max = count / sizeof(struct kinfo_proc);
                int i;  
                for (i = 0; i < max; ++i)
                {
if (0 == strcmp(kp[i].kp_proc.p_comm, [procName cStringUsingEncoding:NSASCIIStringEncoding]))
                        {
                                err = 0;
NSLog(@"%@:%s Process found, pid = %u", [self class], _cmd, kp[i].kp_proc.p_pid );
                        }
                }


If loginwindow string is slightly different then you will see it here.



On 1 Jul 2008, at 09:28, Толя Макаров wrote:

dreamcat7

The process loginwindow is not shown In the list that is given by the function sysctl. May be this process has another name. Do you know anything about it?


Makarov Anatolii



     ________________________________________________________
Вы уже с Yahoo!?
Испытайте обновленную и улучшенную. Yahoo! Почту! http://ru.mail.yahoo.com
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/dreamcat7%40googlemail.com

This email sent to [EMAIL PROTECTED]

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to