Mailing Lists: Apple Mailing Lists

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

different execv path behavior



Hi Niels,

a completely stupid question: do you NUL terminate the string you are building (in non literal form)?

To verify this, try to print out the string before you call execv(2), but print it out using fprintf(3) or similar, as the GUI methods may hide the error. Alternatively, set the breakpoint on execv, and verify the correctness of the string in the debugger.

Hope this helps,
Marino

Am 03.11.2004 um 21:10 schrieb email@hidden:

Message: 2 Date: Wed, 03 Nov 2004 16:51:39 +0300 From: "Niels Gorisse" <email@hidden> Subject: different execv path behavior (RE: different fork behavior in...) To: email@hidden Message-ID: <email@hidden> Content-Type: text/plain; format=flowed

Hi all,

I managed to reduce my problem to the following. I have to start a process
on a give location. When I give execv a const char* path, like
"/Volumes/disk2/CPSDistr", it works great. When I don't give it a const
char*, but a char* (which I have to do because I don't know where it is),
then it doesn't work, only when I give no path at all ("CPSDistr" or
"/CPSDistr"). It worked before, but now on 10.3.5 not anymore.


How can I make sure the process is always started, no matter where it is?

Thanks for any clue,

Niels

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.com/

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

This email sent to 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.