Welcome to MacForumz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

open function hang on MacOS 10.5.1

 
   Macintosh computer (Home) -> Programmer Help RSS
Next:  Bank of Sweden Treasury - Strategic Infrastructur..  
Author Message
p2

External


Since: May 19, 2007
Posts: 18



(Msg. 1) Posted: Tue Feb 26, 2008 3:06 am
Post subject: open function hang on MacOS 10.5.1
Archived from groups: comp>sys>mac>programmer>help (more info?)

Hi

I used open function to open bluetooth port on MacOS 10.5.1.

My code is as below

int fd = -1;
fd = open(Bluetooth port path,O_RDWR + O_NOCTTY + O_NONBLOCK +
O_EXLOCK);
if(fd == -1)
printf("\nPort open failed..");
else
{
printf("\nPort successfully opened..);
close(fd);
}

but it hangs in open function, it is not returning....i also tried
with various flags..
Note :: Same thing works on MacOS 10.4(it's return success or failed)

What may be the problem ?

p2

 >> Stay informed about: open function hang on MacOS 10.5.1 
Back to top
Login to vote
p2

External


Since: May 19, 2007
Posts: 18



(Msg. 2) Posted: Tue Feb 26, 2008 4:56 am
Post subject: Re: open function hang on MacOS 10.5.1 [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Feb 26, 4:06 pm, p2 wrote:
> Hi
>
> I used open function to open bluetooth port on MacOS 10.5.1.
>
> My code is as below
>
> int fd = -1;
> fd = open(Bluetooth port path,O_RDWR + O_NOCTTY + O_NONBLOCK +
> O_EXLOCK);
> if(fd == -1)
> printf("\nPort open failed..");
> else
> {
>  printf("\nPort successfully opened..);
>  close(fd);
>
> }
>
> but it hangs in open function, it is not returning....i also tried
> with various flags..
> Note :: Same thing works on MacOS 10.4(it's return success or failed)
>
> What may be the problem ?
>
> p2

i do operation as in sequence open & close then again open immediately

 >> Stay informed about: open function hang on MacOS 10.5.1 
Back to top
Login to vote
p2

External


Since: May 19, 2007
Posts: 18



(Msg. 3) Posted: Tue Feb 26, 2008 4:59 am
Post subject: Re: open function hang on MacOS 10.5.1 [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Feb 26, 4:06 pm, p2 wrote:
> Hi
>
> I used open function to open bluetooth port on MacOS 10.5.1.
>
> My code is as below
>
> int fd = -1;
> fd = open(Bluetooth port path,O_RDWR + O_NOCTTY + O_NONBLOCK +
> O_EXLOCK);
> if(fd == -1)
> printf("\nPort open failed..");
> else
> {
>  printf("\nPort successfully opened..);
>  close(fd);
>
> }
>
> but it hangs in open function, it is not returning....i also tried
> with various flags..
> Note :: Same thing works on MacOS 10.4(it's return success or failed)
>
> What may be the problem ?
>
> p2

I do operation in sequence open then close then again open
immediately...
first time it open successfully .. second time it hand in open. (open
function block)
 >> Stay informed about: open function hang on MacOS 10.5.1 
Back to top
Login to vote
Display posts from previous:   
   Macintosh computer (Home) -> Programmer Help All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]