Don't use getpid() - use globallyUniqueString instead

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@3635 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 1999-02-01 14:14:58 +00:00
parent 204b4980d1
commit 7432e086e2

View file

@ -627,7 +627,7 @@ static NSString *disabledName = @".GNUstepDisabled";
NSMutableSet *keyEquivalents;
unsigned pos;
unsigned loc0;
unsigned loc1;
unsigned loc1 = 0;
SEL sel = @selector(doService:);
NSMenu *submenu = nil;
@ -763,8 +763,8 @@ static NSString *disabledName = @".GNUstepDisabled";
if (result == NSAlertDefaultReturn || result == NSAlertOtherReturn)
{
if (result == NSAlertOtherReturn)
appName = [NSString stringWithFormat: @"%@_%d",
appName, (int)getpid()];
appName = [[NSProcessInfo processInfo] globallyUniqueString];
[[NSPortNameServer defaultPortNameServer] removePortForName: appName];
NS_DURING