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: Background app running as root and logout process



Thanks for your reply, Jerry.

I need my BOA runs as root. This system is for monitor
application usage. The BOA is tracking all user
actions and it is writing log files with that
information. If it runs as the login user, he could
read or delete those log files ... or to kill the
process.

What's the best way to do something like that?

Thanks in advance, Jerry ...
Regards


--- Jerry Pendergraft <email@hidden> wrote:
> Could you have the daemon invoke the BOA as the
> login user instead of
> root? Would that solve the problem?
>
> --
> Jerry Pendergraft
> email@hidden
> Endocardial Solutions voice:
> 651-523-6935
> 1350 Energy Lane, Suite 110 fax:
> 651-644-7897
> St Paul, MN 55108-5254 mobile:
> 651-491-0163
>
> On Thu, 26 Feb 2004, Robert Fab wrote:
>
> > Hello everybody,
> >
> > I have a tool application which runs as a daemon
> on
> > startup. It just links against CoreServices
> framework
> > and installs a notifier for the login event. When
> it
> > detects a login, it launches another application.
> This
> > second one will run as a background-only app (BOA)
> and
> > it links against Carbon framework. Both run as
> root.
> >
> > The BOA calls RunApplicationEventLoop to install a
> > standard event handler.
> >
> > My problem is that running in Mac OS 10.3.2, after
> a
> > user logout, the loginwindow process tries to quit
> my
> > BOA and it can't. The Console shows me this alert:
> >
> > "login window: sendQuitEventToApp (myApp):
> > AESendWithMach returned error -1712"
> >
> > The -1712 error means time out. After that, my BOA
> is
> > killed.
> >
> > This is understandable because the BOA is running
> as
> > root and loginwindow as the logged user.
> >
> > I have seen a different behavior on early Jaguar
> > versions like 10.2.3, where the BOA replied to the
> > quit apple event.
> >
> > I don't want my BOA get killed because I need to
> do
> > some post-processing after RunApplicationEventLoop
> > call. Some ideas?
> >
> > Thanks in advance ...
> >
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > Get better spam protection with Yahoo! Mail.
> > http://antispam.yahoo.com/tools
> > _______________________________________________
> > darwin-development mailing list |
> email@hidden
> > Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/darwin-development
> > Do not post admin requests to the list. They will
> be ignored.
> >
>


__________________________________
Do you Yahoo!?
Get better spam protection with Yahoo! Mail.
http://antispam.yahoo.com/tools
_______________________________________________
darwin-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-development
Do not post admin requests to the list. They will be ignored.




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.