mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 23:10:58 +00:00
growl agent should handle port busy
if the port can't be bound, die cleanly. FIXES 126812 Change-Id: I6523f18c2b5f5bacfbd11d08736b9af14fa666e2 Reviewed-on: http://gerrit.openafs.org/1651 Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
parent
37eeead346
commit
af41515608
@ -223,10 +223,16 @@ int main(int argc, const char **argv) {
|
||||
CFSocketContext MarinerSocketContext = {0, (void *)&growlContext, NULL, NULL, NULL };
|
||||
|
||||
CFSocketRef MarinerSocket = CFSocketCreateWithSocketSignature(kCFAllocatorDefault, &MarinerSignature, kCFSocketReadCallBack, &MySocketReadCallBack, &MarinerSocketContext);
|
||||
|
||||
if (!MarinerSocket)
|
||||
goto fail;
|
||||
|
||||
CFSocketSetSocketFlags(MarinerSocket, kCFSocketCloseOnInvalidate|kCFSocketAutomaticallyReenableReadCallBack);
|
||||
|
||||
CFRunLoopSourceRef MarinerRunLoopSource = CFSocketCreateRunLoopSource(NULL, MarinerSocket, 0);
|
||||
if (!MarinerRunLoopSource)
|
||||
goto fail;
|
||||
|
||||
CFRunLoopAddSource(CFRunLoopGetCurrent(), MarinerRunLoopSource, kCFRunLoopCommonModes);
|
||||
|
||||
/* Run the run loop until it is manually cancelled */
|
||||
@ -236,6 +242,7 @@ int main(int argc, const char **argv) {
|
||||
CFRelease(MarinerRunLoopSource);
|
||||
CFSocketInvalidate(MarinerSocket);
|
||||
CFRelease(MarinerSocket);
|
||||
fail:
|
||||
/* CFRelease(notificationInfo); */
|
||||
[pool release];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user