ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » User Exits » Thread id in Exit programs - RHEL3

Post new topic  Reply to topic
 Thread id in Exit programs - RHEL3 « View previous topic :: View next topic » 
Author Message
ktg
PostPosted: Tue Feb 12, 2008 9:18 pm    Post subject: Thread id in Exit programs - RHEL3 Reply with quote

Centurion

Joined: 09 Jan 2006
Posts: 138
Location: India

Hi All,

We have API exit and Security exit programs which need to collect thread id when invoked. The exit code works in Solaris. But the same code is printing negative values in linux - rhel3. We are using

sprintf(thread_id,"SecExit: TID:%i", pthread_self());

Using "%d" or "%l" or "%ld" instead of "%i" didn't help.

Please help.

TIA.

-Kalpana
Back to top
View user's profile Send private message AIM Address
ktg
PostPosted: Fri Feb 15, 2008 10:35 am    Post subject: Reply with quote

Centurion

Joined: 09 Jan 2006
Posts: 138
Location: India

In Solaris, pthread_t is of type unsigned int. In RHEL3, it is of type unsigned long int. We were getting this problem as we were reading thread id as int("%i"). It got solved by reading thread id as unsigned long int("%lu" ). Hence issue is related to OS.....nothing specific to MQ/Exits....... Now we are getting positive values as thread ids. But surprisingly these thread ids are very large values - 10 digit numbers though there will be only 10-15 threads.

Regards,
Kalpana
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » User Exits » Thread id in Exit programs - RHEL3
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.