Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: getutxent() not returning values when using 10.4u SDK



I tried using the utmp code in http://www.opensource.apple.com/darwinsource/10.5.4/shell_cmds-118/w/w.c but it gives an error, "/var/run/utmp: No such file or directory" when attempting:

	if ((ut = fopen(_PATH_UTMP, "r")) == NULL)
		err(1, "%s", _PATH_UTMP);

This file utmp does not appear to exist on 10.5.

(Basically, my only goal here is to find how long the current user has been logged in and doing it from a daemon safe framework/library.

On Jul 24, 2008, at 4:22 PM, Terry Lambert wrote:

If you want the same information back for both SDKs, then you need to limit yourself to utmp instead, since that was fully supported in 10.4, and is a common API (it's considered legacy on 10.5 and later, but it should give the same answers for both SDKs).




---
Sincerely,
Rosyna Keller
Technical Support/Carbon troll/Always needs a hug

Unsanity: Unsane Tools for Insanely Great People

It's either this, or imagining Phil Schiller in a thong.

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden
References: 
 >getutxent() not returning values when using 10.4u SDK (From: Rosyna <email@hidden>)
 >Re: getutxent() not returning values when using 10.4u SDK (From: Terry Lambert <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.