Re: Mysterious "File exists" message logged to console
Re: Mysterious "File exists" message logged to console
- Subject: Re: Mysterious "File exists" message logged to console
- From: Ken Thomases <email@hidden>
- Date: Thu, 15 Dec 2011 10:59:37 -0600
On Dec 15, 2011, at 9:29 AM, Mike Abdullah wrote:
> I'm trying to track down a bug and have a copy of a customer's console log to help me. There's rather a lot of messages like this:
>
> open on /Users/foo/bar/mydocument.package/DSC_0221.jpg: File exists
>
> Searching the web has been fruitless so far, so does anybody know which Cocoa API(s) would produce such messages?
The "File exists" string is almost certainly the result of strerror(EEXIST).
As to where that's coming from, you might (have the customer) try the following:
sudo dtrace -n '
syscall::open*:return
/pid == $target && errno != 0/
{
printf("%s %s\n", probefunc, errno);
ustack();
}' -p <pid of your program>
(I split the quoted part across multiple lines, but you can collapse it to one line. A long line is more likely to be mangled in email transit.)
Regards,
Ken
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden