FROM : Brad Peterson
DATE : Wed Jul 19 03:35:20 2006
Hi all,
I'm experiencing some very odd behavior with NSTask.
It seems that some portions of the main app's
environment are inherited by the NSTask-launched
"sub-task".
My main app runs as root, and occasionally relies on a
sub task to do specialized functions, such as writing
data to the Address Book.
When this sub-task is launched on its own, outside of
the main app, everything writes to Address Book just
fine. However, when it's run as a sub-task through
NSTask, the writes fail every time.
I've confirmed that the sub-task isn't running as root
(though I don't know why that would make a difference)
by logging the results of a getgid() call. (501 was
the result.)
My question is this: Are there any known issues with
NSTask along these lines? Or, does NSTask change the
operating environment of the sub-task in some way?
Also, does anyone have any suggestions on how I can
debug this further? Possibly a good sample that logs
all kinds of crazy information about the environment?
;)
Many thanks,
B
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
DATE : Wed Jul 19 03:35:20 2006
Hi all,
I'm experiencing some very odd behavior with NSTask.
It seems that some portions of the main app's
environment are inherited by the NSTask-launched
"sub-task".
My main app runs as root, and occasionally relies on a
sub task to do specialized functions, such as writing
data to the Address Book.
When this sub-task is launched on its own, outside of
the main app, everything writes to Address Book just
fine. However, when it's run as a sub-task through
NSTask, the writes fail every time.
I've confirmed that the sub-task isn't running as root
(though I don't know why that would make a difference)
by logging the results of a getgid() call. (501 was
the result.)
My question is this: Are there any known issues with
NSTask along these lines? Or, does NSTask change the
operating environment of the sub-task in some way?
Also, does anyone have any suggestions on how I can
debug this further? Possibly a good sample that logs
all kinds of crazy information about the environment?
;)
Many thanks,
B
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com






Cocoa mail archive

